ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: [newbie] Copy jars mensioned in classpath
Date Mon, 24 Mar 2003 15:25:59 GMT
I'm afraid not directly.... At least I can't think of one. In your
situation, I'd write a <script> that creates that populates a copy tasks
with every file of a Path, feeding a <fileset file="thefile"/> for each
entry in Path#list() to <copy> (which accepts several filesets).

Alternatively, if all your JARs are commonly rooted (have the same basedir,
hopefully not the filesystem root!), you could somehow define a <fileset> of
them, to be used in the <path> and <copy>, but then it's unordered...

Like I said, not the ideal situation... --DD

-----Original Message-----
From: "Schaible, Jörg" [] 
Sent: Monday, March 24, 2003 5:40 AM
To: Ant Users List
Subject: [newbie] Copy jars mensioned in classpath


my application is based on several other Java libraries. These are defined
in an
 external property file, e.g.


you got the pattern ...

In the build.xml I am now able to use this definitions like:

	<path id="classpath">
		<pathelement path="${foo.path}" />
		<pathelement path="${bar.path}" />

	<target name="compile">
		<mkdir dir="${build.dir}" />
		<javac srcdir="${}"
		   	 classpathref="classpath" >

Works fine.

Now I want to copy the jars used in the classpath to a distribution
but I did not find a solution using the copy-task to define a fileset based
the definitions made above, since every definition could contain more than
jar file separated by a colon. Is there any task or a fileset construct,
enables me to get the jars from the involved classpath in a fileset?

View raw message