ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amnon Khen" <>
Subject complex arguments and the <apply> task
Date Tue, 19 Oct 2004 13:45:57 GMT
Hello Ant folk,


I am trying to use the <apply> task to apply some tool on a set of
files. The problem that the tool accepts its arguments in the format
-arg=file (i.e. a single argument without a space between "-arg" and the
filename that follows it), and I haven't found a way to generate this
type of argument.


This is the task I'm trying to execute:

<apply executable="my_tool" dir="working_dir"...>

            <fileset .../>


<mapper type="regexp" from="^.*$" to="-arg=\0"/>



I though that using the mapper to prefix the target file with "-arg"
would do the trick, but what actually happens is that Ant prefixes the
argument with the task's working directory. The generated command is:
"my_tool working_dir/-arg=file". What I need, is " my_tool -arg=file".

I though of writing my own mapper, but I understand that prefixing of
the working directory doesn't happen in the mapper.


Has anyone tried something like this before?

Does anyone have an idea how to solve this problem?


Thanks for your time and consideration,




            Amnon Khen

            Configuration Management, Unipier LTD. (formerly Cash-u)

            mobile: +972-54-4922394, web:


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message