ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: non-Filelist list of jars
Date Thu, 02 Oct 2003 09:44:18 GMT
OK I shall check out Maven as well, but for now I have got it to work 
with <foreach/> like so:

   <target name="deploy" depends="compile">
     ... etc
     <foreach list="${external.jars}" delimiter=":"
            target="jarcopy" param="jarfile">
        <param name="jartodir"

   <target name="jarcopy" depends="">
     <copy todir="${jartodir}" file="${jarfile}" />

Now I am being demanding I suppose, but this spits out per jar file:

      [copy] Copying 1 file to 

So, firstly, can I suppress the output and add up the count of copies 
somehow? Failing that, can I at least suppress the naming of the build 

Thanks for helping me get so far!


On 10/02/2003 10:43 AM wrote:
>>I'm looking for a way to deal with a list of properties which specify 
>>jars that I want to (a) include on a classpath and (b) copy 
>>to a deploy 
>>I've got two files that I import:
>>(1) puts the full pathname of jars into properties:
>>(2) creates a property which is a list of some of those jars:
>>When I've loaded 1 & 2, my ${external.jars} becomes a comma-seperated 
>>list of jars with full pathnames.
>>Now I want to use ${external.jars} as input for my compile 
>>task, since 
>>the jars I specify there all have to be on the classpath, and I also 
>>want my deploy task to copy the jars listed in 
>>${external.jars} to the 
>>deploy directory.
> <path id="path">
>     <pathelement path="${external.jars}"/>
> </path>
> <javac classpathref="path"/>
>>You'll notice that in (1) the jars could be anywhere, i.e. 
>>not relative 
>>to one point on a harddrive, which rules out filelists and filesets.
>>Can I iterate over my ${external.jars} in some way? Is there another 
>>approach I could take?
> AntContrib: <foreach list="${external.jars}"/>
> foreach supports comma separated lists.
>>The reason why I am doing this is essentially to allow different 
>>projects and different developers to pick and choose the jars 
>>they need 
>>from a pre-prepared list (my first file 
>>above), without 
>>having to modify the build.xml tasks.
> Aehmmm <deeply-thinking/> there was a discussion earlier about getting
> libraries ... Maven has support for autodownload, and something on that
> topic was discussed.
> Jan

ant 1.6alpha + java 1.4.2 on Linux 2.4.20 RH9

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

View raw message