ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francisco Tolmasky <tolma...@gmail.com>
Subject Relative Paths in Imported Files
Date Sun, 17 Aug 2008 20:18:39 GMT
I have a common.xml file that I import in all my build.xml throughout  
my project (subdirectories included).  One of the tasks defined in  
this common.xml has to reference a file in a java task, as so:

     <macrodef name = "my-tasl">

         <element name = "arguments"/>

         <sequential>
             <java classname = "blah..Main" >
                 <classpath>
                     <pathelement location = "../Jars/thejar.jar" />
                     <pathelement location = "." />
                 </classpath>

                 <arguments/>
             </java>
         </sequential>
     </macrodef>

Unfortunately, this only works from certain directories, since the  
pathelement location is relative.  Is there any way to make a relative  
file path from the location of the common.xml file itself?

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


Mime
View raw message