You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Francisco Tolmasky <to...@gmail.com> on 2008/08/17 22:10:24 UTC

SubAnt BaseDir Woes With Java Task

I am having issues with the basedir not being correct in SubAnt  
again.  This time it's because it seems that the java task does not  
seem to respect the basedir.  I have the following structure:

My-Project/
build.xml
Tools/
	Tool1/
		build.xml
	Tool2/
		build.xml
etc

the top build.xml just has the iterate command basically straight from  
the subant docs:

         <macrodef name = "iterate">

             <attribute name = "target"/>

             <sequential>
                 <subant target="@{target}" >
                     <fileset dir="." includes="**/build_.xml"/>
                 </subant>
             </sequential>

         </macrodef>

         <target name="build">
             <iterate target="build"/>
         </target>

and the build.xml's have builds defined that call a java program.   
However, the java program runs on the top level directory, not the  
basedir, the only way I can get it to run off the basedir is to add  
dir = "${basedir}" fork="true" to the java task.  Is this the  
"correct" way to get this to work?  Seems like it should just run off  
the basedir in the first place no?

Thanks,

Francisco

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org