ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolas Vervelle <>
Subject Re: Apply task argument issues...
Date Tue, 27 Sep 2005 05:41:54 GMT

A few ideas (not tested, just ideas) :
- use a <for> task for iterating through the fileset.
- try a <mapper> to add a "+" before your filename, set addsourcefile to 
false, and use <targetfile/>

Hope this helps,

Alan Moss wrote:

>I have an issue WRT the apply task. I need it to be much more flexible
>than the documentation states it is. Let's say I'm using a tool that has
>odd command line options like this:
>    util.exe [options] +|-<filename>
>    where options is optional and you must specify +<filename>
>    or -<filename>
>Given the current way in which the apply task is implemented, it seems
>impossible to do in ant 1.6.5:
>    <apply executable="util.exe" parallel="false">
>       <arg value="+"/>
>       <srcfile/>
>       <fileset dir="files/"/>
>    </apply>
>Wouldn't it make more sense to do the following:
>    <apply executable="util.exe" parallel="false" srcproperty="srcfile">
>       <arg value="+${srcfile}"/>
>       <fileset dir="files/"/>
>    </apply>
>I can't understand why it was implemented as separate tags rather than
>as properties. In my opinion, the latter example would be more in-step
>with typical ANT thinking.
>Anyway, does anyone know of a way to do what I want with the current
>version of ant?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message