ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <>
Subject Re: <modified> for refid
Date Mon, 24 Jul 2006 20:51:23 GMT
<modified> is a selector, and thus will never have a refid attribute.
It only sees one file at a file, and decides whether this file should
be selected or not.

Selectors always end up being *nested* in a fileset. Each of your
<scp> needs to get a different filesets, corresponding to the files
than need transfering on that particular system. You might think of
the total set of files to be transfered (irrelevant of up-to-date
check) to be your fileset, but it's not, not really.

That said, you should still be able to do what you want by defining a
<patternset> with an id, and each fileset references this one
patternset, and has it's own <modified> with a system-specific
propertyfile cache. Note that this stategy assumes no one changes the
files directly on the system (in which case the cache is out-of-date).

Using a macro around <scp> and the fileset + modified doesn't even
require to explicitly declare a <patternset>, and is probably a better
idea anyway. --DD

On 7/24/06, Michael Giroux <> wrote:
> Currently, <modified> is not supported for refid.  I would like to
> suggest that this is a needed feature.
> I have a project that must be built on several platforms.  The
> build.xml uses scp to copy the files to each target system, then
> sshexec to execute the build script.
> The files are the same on all systems, so I define a single fileset,
> and reference the fileset via refid in each of the scp tasks.
> I would like to use <modified> selector to limit the files that are
> transferred, but there is no way to do this given my use of referenced
> filesets.  I cannot include the selector in the fileset itself since
> the cache will be updated on the first reference, and subsequently no
> transfers will occur for other target systems.
> What I need to do is specify a separate cache for each target
> platform.  The only way to do that with current ANT 1.6.5 is to
> duplicate the fileset in every <scp> task.
> I will look into creating a macro for this, and I'm sure that will
> work, but it seems reasonable to allow the modified selector in a
> fileset that uses a refid as well.
> Michael Giroux
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message