Title: RE: FileSet as a command line argument

Peter Donald [mailto:[EMAIL PROTECTED]] writes:
> On Tue, 18 Sep 2001 09:55, Azariah Jeyakumar wrote:
> > How do I pass a set of file names as a command line
> > argument in tasks such as "java" or "exec"?

> >     <arg>
> >         <fileset dir="${idl.dir}">
> >             <include name="**/*.idl"/>
> >         </fileset>
> >     </arg>

> <path id="mypath.id">
>    <fileset dir="${idl.dir}">
>      <include name="**/*.idl"/>
>   </fileset>
> </path>
>
> <property name="mypath" refid="mypath.id" />

Well, this gives you a single argument in the form of a path, unless I'm missing something. You propose passing this property value as an arg how exactly? value=? path=?.

The following does work (in 1.4), but only if your filenames don't themselves contain spaces:

  <path defined as above>

  <target ....>
     <pathconvert property="mypath" pathsep=" " refid="mypath.id"/>
     <exec .....>
         <arg .../>
         <arg line="${mypath}"/>
     </exec>
  </target>

This converts the path to a space-separated path, and the "line=" then breaks it up into multiple arguments.
--
Shankar.

Reply via email to