ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <Mark.Lybar...@CBC-Companies.com>
Subject RE: generate files *only* if a one of set of sources was modified
Date Tue, 11 Nov 2003 16:27:26 GMT
btw, xdoclet tasks only generate source files when needed. ie, calling
<remoteinterface/> will only generate a remote interface if the Bean
implementation class has been changed since the last remote interface was
generated. same for other stuff in xdoclet.

i know it takes a little time to run through even xdoclet's checking of the
stamps especially of you're using lots of generation.

> -----Original Message-----
> From: Pedro Salazar [mailto:pedro-b-salazar@ptinovacao.pt]
> Sent: Tuesday, November 11, 2003 11:19 AM
> To: Ant Users List
> Subject: Re: generate files *only* if a one of set of sources was
> modified
> 
> 
> On Tue, 2003-11-11 at 15:49, Stefan Bodewig wrote:
> > On 11 Nov 2003, Pedro Salazar <pedro-b-salazar@ptinovacao.pt> 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"
> to="${src.server.dir}/**/ejb/access/*.java"/>
>        <srcfiles dir= "${build.gen.dir}" 
>                 includes="**/ejb/access/**"/>
>     </uptodate>
> 
>     <antcall target="ejb-xdoclet-gen" >
>         <param name="p_include_bean"
>            value="**/ejb/access/*Bean.java"/>
> 
> </target>
> 
> regards,
> Pedro Salazar.
> -- 
> PS
> pedro-b-salazar@ptinovacao.pt
> PGP:0E129E31D803BC61
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.532 / Virus Database: 326 - Release Date: 10/27/2003
 


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


Mime
View raw message