ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: Passing files to a java target
Date Thu, 06 May 2004 23:09:04 GMT
> From: Jonathan Allen [mailto:allenj@spawar.navy.mil]
> 
> I would like to send a list of filenames to a java target. i.e.

You could pass <arg line="${files}"/>, where the files property was
constructed earlier from a <fileset id="files" ... /> (not a <path>) using
<property name="files" refid="files" />.

I believe a toString() method was finally implemented for FileSet, but if
not, wrap the fileset in a <path>, and <pathconvert> it.

Personally, I would use <apply>, and execute java itself. <apply> is exactly
what you would want, except it doesn't work (directly) with Java programs.
You need to execute the command-line Java launcher from <apply>, and pass in
your main class name as the first arguments, etc...

(The Ant team does not want to support Java programs directly in <apply>,
arguing that you should be writing a custom Ant task instead.)

I hope this helps. --DD

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


Mime
View raw message