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, 30 Jan 2004 22:02:58 GMT
--- Stefan Bodewig <> wrote:
> On Fri, 23 Jan 2004, Matt Benson
> <> wrote:
> > (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?
> Yes so far - with the tiny exception that it won't
> work for timestamp
> comparisons as the output will already be open then,
> in the current
> infrastructure, that is.

Stefan:  I checked the code and found that Redirector
uses LazyFileOutputStreams... so timestamp comparisons
should be okay, as illustrated by this test buildfile:

<?xml version="1.0"?>
<project name="test apply" basedir="."

  <fileset id="myfs" dir="${basedir}"
includes="in1,in2,in3" />

  <pathconvert property="do-not-create" pathsep=" "
      <fileset refid="myfs" />

<!--use non-empty files to make sure the output file
gets written-->
  <target name="create" unless="do-not-create">
    <echo file="in1" message="x" />
    <echo file="in2" message="y" />
    <echo file="in3" message="z" />

  <target name="apply" depends="create">
    <apply executable="cat" output="out"
dest="${basedir}" append="true">
      <fileset refid="myfs" />
      <mapper type="merge" to="out" />
  <target name="touch">
      <fileset refid="myfs" />
  <target name="clean">
      <fileset refid="myfs" />
      <fileset file="out" />


compare the results of "ant -v" vs. "ant -v touch
apply".  I think this portion of what we were talking
about is a non-issue.


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

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

View raw message