ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: generate files *only* if a one of set of sources was modified
Date Tue, 11 Nov 2003 16:34:00 GMT
On 11 Nov 2003, Pedro Salazar <pedro-b-salazar@ptinovacao.pt> wrote:
> On Tue, 2003-11-11 at 15:49, Stefan Bodewig wrote:

>> 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?

No, I'd simply also negate the meaning of the property - run the task
only if the property has not been set.  So if any source (with tags)
is more recent than the example generated source, the property will
not be set and the task will get executed.

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

Your ejb-xdoclet-gen <target> probably looks like

<target name="ejb-xdoclet-gen" if="ejb-changed">

and I'd change it to 

<target name="X">
    <uptodate property="ejb-not-changed" 
       <mapper type="merge"
               to="a single sample generated source"/>
       <srcfiles dir= "${src.etc.dir}" 
                includes="**/ejb/access/**"/>
    </uptodate>

    <antcall target="ejb-xdoclet-gen" >
        <param name="p_include_bean"
           value="**/ejb/access/*Bean.java"/>
</target>

<target name="ejb-xdoclet-gen" unless="ejb-not-changed">

and in the next step I'd try to eliminate <antcall> completely, but
that's a different issue.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message