« Return to Thread: Apply task and multiple target files

Apply task and multiple target files

by Gerrit . :: Rate this Message:

Reply to Author | View in Thread


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

 « Return to Thread: Apply task and multiple target files

LightInTheBox - Buy quality products at wholesale price