ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: <apply executable> question
Date Fri, 23 Jan 2004 17:08:35 GMT
--- Stefan Bodewig <> wrote:
> Most of the time when people want to use one output
> file per source
> file, the output is much more than a log file.  See
> m4 for example
> that insists on placing the results to stdout.

Can't tell what m4 is.  Point taken, anyway.  I can't
necessarily think of an example, but I can envision
the need.  However, wouldn't this still covered by
using a nested <mapper> to specify output files
WITHOUT a <targetfile> element, in which case "the
target filenames will not be added to the command line
at all" (from the manual), then, in our hypothetical
"output files can be mapped per source file"
implementation, using the same <mapper> for target
files and output files alike?  The only wrinkle I can
see then is if there were a need to check the source
file against target files representing both sout and
serr.  Fortunately, while composing this response, a
possible solution has presented itself to me. 
Apparently as a result of your own good judgement*
(thankfully I remembered the method signature),
FileNameMapper.mapFileName(String) returns String[]. 
To my knowledge Ant does not contain an implementation
that actually returns an array of > 1 elements, but
would seem fairly straightforward to create a new
built-in <mapper type="composite"> that would accept
nested <mapper> elements.  Then a composite mapper
could be used with <apply> to specify target files,
with no <targetfile> element, and the individual
mappers from the composite specified for sout and
serr.  How's that?


* Though I am an American and do not consider myself
to be particularly obsessed with British things, I use
the British spelling ("judgement" vs. "judgment"),
because like it that way.  >:)

Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message