Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Apply task and multiple target files

Gerrit .

2008-04-17

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi, I'm new to Ant. Maybe there's someone here who can point me to the relevant documentation or an example for my problem:


I'd like to call <apply> for an executable which needs to be passed multiple targets, whose names are derived from the source file. Two of these are actual filesystem paths, one is just a string parameter (also derived from the source filename). When I try to use a compositemapper, I get the error message that "apply doesn't support multiple targetfile elements."

Here's what I tried. It doesn't look quite right anyway, because the 3rd target param isn't really a file.


<apply executable="myexecutable">

  <arg value="-infile"/>
  <srcfile/>
  <arg value="-outfile1"/>
  <targetfile/>
  <arg value="-outfile2"/>
  <targetfile/>
  <arg value="-myparam"/>
  <targetfile/>
 
  <fileset dir="${my_dir}" includes="*.foo"/>
 
  <compositemapper>
    <mapper type="glob" from="*.foo" to="*.bar1"/>
    <mapper type="glob" from="*.foo" to="*.bar2"/>
    <mapper type="glob" from="*.foo" to="*_param"/>
  </compositemapper>
 
</apply>


Can someone help me?
Thanks in advance!



_________________________________________________________________
Discover the new Windows Vista
http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE
©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.