ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Updating classpath while within Ant?
Date Wed, 07 Nov 2001 02:01:36 GMT
The best way to do this is to use the <path /> construct. An example of this 
in use can be seen in ants own build file IIRC.
 Basically you do

<path id ="foo">
  <fileset ... />

And in any task that needs a classpath like javac et al you do sometyhing 

<javac .. >
  <classpath refid="foo"/>

Does that work for you ?

On Wed, 7 Nov 2001 11:31, Kevin A. Burton wrote:
> Is this even possible?  I have gone over everything and can't seem to
> figure out a way to do this.
> I want to manage my classpath AKA WEB-INF/lib but I want to provide my own
> directory for doing this.
> Basically I have a LOT of .jar files and I want to startup ant with a
> minimum set and have it find the rest.
> AKA I want to startup in . and then do this:
> <fileset dir="." id="jarfiles">
>     <include name="lib/*.jar"/>
>     <include name="webapps/reptile/WEB-INF/lib/*.jar"/>
> </fileset>
> <pathconvert pathsep=":" property="java.class.path" refid="jarfiles"/>
> From the source, it looks like this will not modify the system classpath.
> Any suggestions here?



Whatever you do will be insignificant, 
but it is very important that you do it. 

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

View raw message