ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Salazar <>
Subject Re: generate files *only* if a one of set of sources was modified
Date Tue, 11 Nov 2003 16:18:41 GMT
On Tue, 2003-11-11 at 15:49, Stefan Bodewig wrote:
> On 11 Nov 2003, Pedro Salazar <> wrote:
> > There is no relation with the _sources_ (generated files) and the
> > _target_ (java sources with xdoclet tags), besides the timestamp. I
> > just want say this: -generate new files (e.g. run task) if any of my
> > java sources files are more *uptodate* than the generated ones.
> Is it possible to identify a single generated source by name?  All
> generated sources should have the same timestamps IIUC so picking one
> should be enough.  If so, use a merge mapper and point to an arbitrary
> generated source with the to attribute.

Shouldn't be on the other side?

-Set of java sources files (with xdoclet tags):

${src.etc.dir}/**/access/**  ---> TARGET FILES

-Generated sources files (all with the same timestamp)

${build.gen.dir}/**/access/**  ----> SOURCE FILES

If *any* of the TARGET FILES is more *uptodate* than the SOURCE FILES,
run the TASK to generate new ones (SOURCE FILES).

So the "TO" attribute in <mapper> must point to the TARGET FILES which
have different timestamps and must be defined with wildcards!! On the
other side, the SOURCE FILES (generated) should have a shared timestamp.
However, with the <srcfiles> is easy to define a wildcard.

Could you change the target below to explain me better what you said?

<target name="X">
    <uptodate property="ejb-changed" 
       <mapper type="merge"
       <srcfiles dir= "${build.gen.dir}" 

    <antcall target="ejb-xdoclet-gen" >
        <param name="p_include_bean"


Pedro Salazar.

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

View raw message