ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <anto...@gmx.de>
Subject Re: Adding optional tasks classpath from build.xml?
Date Sun, 25 Feb 2007 20:07:26 GMT
Hello Omry,

it is good practice to work the way you envision to do.

The manual page for junit http://ant.apache.org/manual/OptionalTasks/ 
junit.html gives some informations concerning this question.

Supposing junit is one of the optional tasks for which you want to  
use a version stored in the directory tree of the build file, you can  
choose the option <5> from the manual page (assuming you are using  
ant 1.7.0)

So you would add in your build file this line

<taskdef name="junit"  
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"   
classpath="lib/junit/junit-x.y.z.jar"/>

assuming you have ant-junit.jar under $ANT_HOME/lib (which is the  
default if you use one of our releases) and you have a subdirectory  
lib/junit with junit-x-y-z.jar in it in, relative to the basedir of  
the build file.

Best regards,

Antoine


On Feb 25, 2007, at 10:15 AM, Omry Yadan wrote:

> is it possible to add the reference to the required jars for an  
> optional task as a part of the build.xml?
> similar to the way  I can add my own tasks and keep them with the  
> build.xml
> this will make build files much more portable across different  
> machines, because it will be possible to bundle the build.xml with  
> the jars required by the optional tasks it uses.
>
>


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


Mime
View raw message