ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kennard <>
Subject Re: Multiple files to <java> task
Date Sat, 20 Jan 2007 03:25:39 GMT

The files may not but the paths they are in might.
Can "pathconvert" manage to put quotes around all the entries?
(I'll have to look up what pathconvert is :)

Too bad there isn't a nested "fileset" in in an <arg> or <args> item 
to do just this since many command line utilities do it like

compile "s p a c e s path/item 1.txt" "item 2.txt" "item 3.txt" ...

also is a line= compatible with individual <arg value="xx"> ?
ie: the "line" appends afterwords?

At 20:07 1/19/2007, you wrote:
>if your list of file is not too long, that is if you are not going to
>overflow the maximum for command lines (4096 chars under Windows I
>think), and if none of your files contain spaces in their names or
>directories, you can use pathconvert to generate a property from a
>fileset. Then you can pass this property with <arg line="$ {someproperty}"/>
>On Jan 19, 2007, at 4:54 PM, Peter Kennard wrote:
>>I want to pass in a "list" of files as the last arguments to a java
>>utility.  Can this be done with the <java> task?  Any hints on how
>>I might go about it?  Traversing the apache docs, I couldn't find
>>how to do what I would think is one of the first things people
>>would need.
>> From the command line executing the utility would be:
>>java [...] XMLToCode.class *.xml
>>In ant something liek the below:
>><target name="GeneratedCode"
>>    depends="CodeGenerator"
>>    description="Generate Java code" >
>>    <java classname="CodeGenerator.XMLToCode"
>>        fork="true"
>>     >
>>         <classpath refid="compile.classpath"/>
>>         <arg value="-java"/>
>>         <arg value="javadir=${src.home}/Interfaces"/>
>>         <!-- I want a "fileset" or some other file list
>>              to effectively make one <arg> for each item in the
>>list -->
>>     </java>
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message