ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy-Lambert <>
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 
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"  

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,


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:
For additional commands, e-mail:

View raw message