ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knuplesch, Juergen" <Juergen.Knuple...@icongmbh.de>
Subject AW: AW: Setting classpath for nested ant call
Date Thu, 11 Sep 2008 06:44:56 GMT
Just create the right classpath in the calling task using sth like:
 <path id="your.classpath">
          <pathelement location="${javac.classfiles}"/>
          <pathelement location="${somejar}"/>
        </path> 

Then you use this classpath in the compile task using refid.

You will have the refid your.classpath becaus you use inheritrefs=true in your <ant>-call

Consult the manual for durther details.



-- 
Jürgen Knuplesch                    www.icongmbh.de
icon Systemhaus GmbH                Tel. +49 711 806098-275
Sophienstraße 40                    
D-70178 Stuttgart                   Fax. +49 711 806098-299

Geschäftsführer: Uwe Seltmann
HRB Stuttgart 17655
USt-IdNr.: DE 811944121 
-----Ursprüngliche Nachricht-----
Von: merlin_the_happy_pig [mailto:mattyearle@hotmail.com] 
Gesendet: Donnerstag, 11. September 2008 01:53
An: user@ant.apache.org
Betreff: Re: AW: Setting classpath for nested ant call


The nested ant call fails because of compilation errors (classpath wrong!).
So I need to set the classpath in the ant call of the calling build.xml, but can't seem to
get this to work?



Knuplesch, Juergen wrote:
> 
> Hello,
> 
> What fails?
> A task or the whole ant?
> 
> You can set the classpath in the tasks you call. 
> 
> 
> 
> --
> Jürgen Knuplesch
> 
> Geschäftsführer: Uwe Seltmann
> HRB Stuttgart 17655
> USt-IdNr.: DE 811944121
> -----Ursprüngliche Nachricht-----
> Von: merlin_the_happy_pig [mailto:mattyearle@hotmail.com]
> Gesendet: Freitag, 5. September 2008 17:00
> An: user@ant.apache.org
> Betreff: Setting classpath for nested ant call
> 
> 
> Ant newbie here. I need to call another ant task in a different build 
> file, so I do:
> 
> <project name...
>   <target name...
>      <ant dir= antfile= target= inheritRefs="true" inheritAll="true"
>   ...
> 
> The problem is is that this nested ant call fails because the 
> classpath is wrong. Normally this target is called after a setenv.bat 
> file has been called, which generates the correct classpath. I would 
> like to do something
> like:
> 
> <project name...
>   <classpath>
>      <!- add all libs needed to classpath -->
>   <target name...
>      <!-- inherit this correct classpath -->
>      <ant dir= antfile= target= inheritRefs="true" inheritAll="true"
> 
> 
> I can't find a way of doing this!?
> --
> View this message in context:
> http://www.nabble.com/Setting-classpath-for-nested-ant-call-tp19333163
> p19333163.html Sent from the Ant - Users mailing list archive at 
> Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional 
> commands, e-mail: user-help@ant.apache.org
> 
> 
> 

--
View this message in context: http://www.nabble.com/Setting-classpath-for-nested-ant-call-tp19333163p19425348.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


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


Mime
View raw message