tags:

views:

150

answers:

2

I'm a newbie on Ant so instead of posting this on the official buglist(because its probably not a bug), I decided to post here:

When I run my Ant build.xml file everything works well except for the build directory, that instead of translating the property ${classes.dir} into build/ver_2.0.0/classes it creates a file ${cv.build.dir}/classes

Here is part of the ant code:

<!--Properties-->
<property name="build.ver"   value="2.0.0"/> 
<property name="src.dir"     value="src"/>
<property name="lib.dir"     value="lib"/>
<property name="build.dir"   value="build"/>
<property name="classes.dir" value="${cv.build.dir}/classes"/>
<property name="jar.dir"     value="${cv.build.dir}/jar"/>
<property name="main-class"  value="br.uesc.computacao.estagio.controlador.ControladorModoExecucao"/>
<property name="cv.dir"      value="ver_${build.ver}"/>
<property name="cv.src.dir"  value="${src.dir}/${cv.dir}"/>
<property name="cv.build.dir" value="${build.dir}/${cv.dir}"/>
...
<target name="compile">
    <mkdir dir="${classes.dir}"/>
+5  A: 
<property name="before" value="${after}"/>
<property name="after" value="MyBuildDirectory"/>

<target name="test" >
<mkdir dir="${before}"/>
</target>

It will create directory named ${after}... You must initialize your parameters first before use!

gedevan
A: 

Now I get it, thanks gedevan!

Diones