ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rémon van Gijn <>
Subject RE: Extend lib-path
Date Thu, 20 Apr 2006 14:05:08 GMT

We use the below approach, using <extendclasspath> that comes with the cenquatasks-1.3.8.jar.
It fixed it for me while I had exactly your problem.
Define your own lib.dir for this.

<property name="lib.cenquatasks" value="cenquatasks-1.3.8.jar" />
<property name="lib.junit" value="junit-3.8.1.jar" />
<property environment="env" />
<!-- junit and clover need to be added to the default classpath -->
		<taskdef resource="com/cenqua/ant/antlib.xml" classpath="${lib.dir}/${lib.cenquatasks}"
		<extendclasspath path="${lib.dir}/${lib.junit}" />
<taskdef name="junit" classname="">
				<pathelement location="${env.ANT_HOME}/lib/ant-junit.jar" />
				<pathelement location="${env.ANT_HOME}/lib/${lib.junit}" />
				<pathelement location="${lib.dir}/${lib.junit}" />

Hope it helps you.
Met vriendelijke groet,

Rémon van Gijn
Port infolink b.v.

-----Original Message-----
From: Roman Gavrilov [] 
Sent: donderdag 20 april 2006 15:48
To: Ant Users List
Subject: RE: Extend lib-path

RG>I have a task that depend on a .jar. Is there a way to point 
RG>the ant to the .jar in question from within build file? I.e. 
RG>kind of set -lib from the script?

Jan> Providing that inside the classpath of <taskdef> ?

Doesn't work, it complains that it "could not create task junit!", but
if I run ant as "ant -cp ..\lib\junit.jar" it works just fine.

Task def looks as follows:
    <taskdef resource="net/sf/ant4eclipse/antlib.xml"
            <pathelement location="${LIB_PATH}/junit.jar" />

BTW, The task itself does not allow nested classpath elements.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message