ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klara Ward <>
Subject Re: adding to classpath used in <ant> target
Date Tue, 06 May 2003 07:15:12 GMT
I solved this by calling ant from:
        <java classname=""
         <arg line="-Dant.home=${ant.home}"/>
         <arg line="-f ${foo}/build.xml"/>
     <arg line="-Dvm=${jvm}"/>
     <arg line="-Dtest=${test}"/>
           <pathelement location="${bar.home}/bar.jar"/>
           <pathelement path="${java.class.path}"/>

A pain when you would really want inheritsAll="true", but at least the 
classpath got set.


"Klara Ward wrote:

> It did not work adding a <classpath> to <ant>
> So how can I do it instead?
> Klara
> Klara Ward wrote:
>> I run an antscript from a .cmd/.sh file, and inside the antscript I 
>> run an <ant> task.
>> This ant task needs to have a certain jar-file in the classpath when 
>> it's running.
>> The jar-file can have different versions and the currently used 
>> version is stated in a properties file.
>> Is there someway I can wait until I get into the first ant-script 
>> before adding this jar to the classpath
>> and not have to set it in the CLASSPATH variable in the  .cmd/.sh 
>> file (which leads to redundancies)
>> Can I just add a <classpath> tag to <ant>, and how do I know it uses

>> both the classpath ant starts with, and the jar file I added?
>> Klara
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message