ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard_Lan...@capgroup.com
Subject RE: Passing files to a java target
Date Thu, 06 May 2004 23:30:51 GMT





For more informatin, please see 1.6.5.3. from the TheElementsofAntStyle
entry on the ant wiki (http://wiki.apache.org/ant/TheElementsOfAntStyle).
You can then assign the value of reference id to a property and then pass
that properties value to you program.



                                                                                         
                                           
                      Dominique                                                          
                                           
                      Devienne                 To:       "'Ant Users List'" <user@ant.apache.org>
                                   
                      <DDevienne@lgc.co        cc:       (bcc: Richard Landon/CDS/CG/CAPITAL)
                                       
                      m>                       Subject:  RE: Passing files to a java target
                                         
                                                                                         
                                           
                      05/06/2004 04:09                                                   
                                           
                      PM                                                                 
                                           
                      Please respond to                                                  
                                           
                      "Ant Users List"                                                   
                                           
                                                                                         
                                           
                                                                                         
                                           




> 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





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


Mime
View raw message