You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by DONNIE HALE <DH...@longaberger.com> on 2000/12/12 17:13:11 UTC
Property not evaluated in project "basedir" attribute
** High Priority **
In my ant command line, I'm setting a property via "-dBLDROOT=$BLDROOT" (Korn shell). The project element in the build file attempts to set basedir using
'basedir="${BLDROOT}". When I run the script, I eventually get a "BUILD FAILED" error with other messages that the "${BLDROOT}" (unexpanded) directory doesn't exist. If I run with the "-verbose" switch, I see that a "ro" property is getting set with the correct value. But apparently it's not being used to expand the project element's basedir attribute.
Any ideas?
Thanks,
Donnie
Re: DIR attribut of JAVA tag
Posted by Stefan Bodewig <bo...@apache.org>.
Jean-Baptiste BRIAUD <je...@solsoft.fr> wrote:
> Hello all,
>
> I had noticed that when using dir attribut of java tag :
>
> <target name="startps" depends="init">
> <java classname="[snip]" dir="${JVM.DIR}" fork="yes">
> <jvmarg line="../foo" />
> <arg line="[snip]"/>
> <classpath path="[snip]" />
> </java>
> </target>
>
> the path specified with dir became the current dir of the JVM.
>
I'm not sure I understand the problem, sorry. Is this here the one
you'd like get interpreted differently?
> <jvmarg line="../foo" />
If so, try
<jvmarg file="../foo" />
Does this do what you want?
Stefan
DIR attribut of JAVA tag
Posted by Jean-Baptiste BRIAUD <je...@solsoft.fr>.
Hello all,
I had noticed that when using dir attribut of java tag :
<target name="startps" depends="init">
<java classname="[snip]" dir="${JVM.DIR}" fork="yes">
<jvmarg line="../foo" />
<arg line="[snip]"/>
<classpath path="[snip]" />
</java>
</target>
the path specified with dir became the current dir of the JVM.
I think this is a strange behavior since we specified
current dir of all process relative to BASEDIR with
the PROJECT tag :
<project name="[snip]" basedir ="." default="help" ...
Using DIR attribut is very usefull to choose the
JVM version to use (1.3, 1.2, ...).
Let's imagine my class need foo folder, foo may be
a level higher than BASEDIR, (it work like that
before I used DIR attribut) but with DIR attribut
it will assume than foo is "inside" DIR folder.
Am I missing something ?
Any help appreciated.
Thanks !
--
_______________________________________________________
Jean-Baptiste BRIAUD Solsoft
software engineer http://www.solsoft.fr
Solsoft SA 130 rue Victor Hugo 92300 Levallois-Perret
"Policy Management for eBusiness Security"
Re: Property not evaluated in project "basedir" attribute
Posted by Stefan Bodewig <bo...@apache.org>.
DONNIE HALE <DH...@longaberger.com> wrote:
> In my ant command line, I'm setting a property via
> "-dBLDROOT=$BLDROOT" (Korn shell). The project element in the build
> file attempts to set basedir using 'basedir="${BLDROOT}".
Currently Ant won't expand properties in <project> or <target>. A
workaround would be to not define basedir at all and invoke Ant with
-Dbasidr=$BLDROOT as Ant looks for a property named basedir if the
corresponding attribute has not been set.
Stefan