ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prasen <pra...@bea.com>
Subject Re: conditional dependency logic based "uptodate"
Date Wed, 16 Jan 2002 04:49:34 GMT


Erik Hatcher wrote:
> 
> Two ways I know of:
> 
> 1) Make <myrmic> take care of it internally - this is really the "Ant-way".

Actually <myrmic> is a taskdef on whose sources I dont have any control
:(

> 2) Use <apply> to invoke rmic as a command-line utility, and using a
> <mapper> you should be able to achieve the up-to-date checks you desire.

I didnt quite understand this approach. How do I get ONLY the outdated
files ? I guess "uptodate" ONLY sets a property if any of its srcfile is
more uptodate than its target files, but how do I know which files are
outdated and process only those? A simple example would be great.

thanks,
prasen


> 
>     Erik
> 
> ----- Original Message -----
> From: "prasen" <prasen@bea.com>
> To: "Ant Users List" <ant-user@jakarta.apache.org>
> Sent: Tuesday, January 15, 2002 10:14 PM
> Subject: conditional dependency logic based "uptodate"
> 
> > Hi All,
> >   I want to selectively invoke rmic only on outdated files. How do I do
> > that in ant ? For example:
> >
> >   <target name="determine-rmic">
> >     <uptodate property="rmic.notRequired">
> >       <srcfiles dir="${src}">
> >         <include name="com/mycompany/rmi/*.java"/>
> >       </srcfiles>
> >       <mapper type="glob" from="*.java" to="${classdir}/*_Skel.java"/>
> >     </uptodate>
> >   </target>
> >   <target name="make-rmic" depends="determine-rmic"
> > unless="rmic.notRequired">
> >     <myrmic dir="${src}/com/mycompany/rmi/*.java"/>
> >   </target>
> >
> > But this logic invokes target "make-rmic", which runs rmi compiler on
> > ALL the java files. I want to modify the logic so that only outdated
> > files are compiled. is there any way in ant to accomplish this ?
> >
> > thanks,
> > prasen
> >
> > --
> > To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> >
> >
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

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


Mime
View raw message