ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris" <ct...@virginia.edu>
Subject RE: Classpath outside of javac?
Date Thu, 08 Jul 2004 20:21:17 GMT
Actually I found another way to accomplish what I wanted.  I created a
path that was all my libs and then converted it to a string to get the
"master" list of what's in the classpath.  I wanted this list so I could
do checking to make sure all the files were really there etc...

Chris

-----Original Message-----
From: Chris [mailto:ctc3m@virginia.edu] 
Sent: Thursday, July 08, 2004 12:37 PM
To: 'Ant Users List'
Subject: RE: Classpath outside of javac?


Well I was trying to declare a property like:
<property name="lib.list" value="lib1,lib2,lib3,lib4,lib5/>

And then loop through that and add each lib to the classpath one at a
time.  The reason I was wanting to do this is so if I need to change the
jars in the classpath I only have to change the list and then everything
would work.  What I was trying looked like:

<target name="init" description="Creates output directories needed to
build">
	<foreach target="classpath.setup" list="${lib.list}"
param="jars"/> </target>

<target name="classpath.setup" description="Hopefully this iterates
through a list to setup the classpath"
      depends="check.properties">
      	<classpath>
                    <pathelement location="${jars}.jar"/>
          	</classpath>
</target>

And then later on I'd call javac and it would use that classpath.

-----Original Message-----
From: Antoine Levy-Lambert [mailto:antoine@gmx.de] 
Sent: Thursday, July 08, 2004 12:28 PM
To: Ant Users List
Subject: Re: Classpath outside of javac?


you want to do something like :
<path id="compile.classpath">
   <pathelement location="lib/a.jar"/>
   <pathelement location="lib/b.jar"/>
</path>
<javac>
   <classpath refid="compile.classpath"/>
</javac>

> Is it possible to set the classpath outside of a <javac> task and then

> have javac know about it when it is run?  I'm trying to find a clever
> way to set up the classpath for my projects.  I tried making a 
> property that was a list of all the jars needed for the classpath and 
> then <foreach>ing through the list and adding each jar to my classpath

> but Ant didn't like this.  Is what I'm trying possible or is there
> some other way to accomplish this?
> 
> Thanks
> Chris
> 


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 7/5/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 7/5/2004
 


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 7/5/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 7/5/2004
 


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


Mime
View raw message