ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject RE: conditional compilation with Jet
Date Mon, 08 Aug 2005 21:04:06 GMT
> From: Roedy Green [mailto:roedyg@mindprod.com]
> 
> I am using the Jet compiler which takes a jar and produces an exe.
> 
> <target name="jet">
>      <exec executable="jc.exe" dir="${project.dir}">
>          <arg value="converter.jar" />
>      </exec>
> </target>
> 
> This is an time-consuming operation that is not needed if the
> converter.exe has a last-modified date after the jar's.
> 
> Any hints on what you do to bypass the work if the exe is already up to
> date?

<uptodate> and <dependset> are both useful, but the best IMHO is
Ant-Contrib's <outofdate>.

Note though that the above is a generic statement. In your particular case
of using <exec>, <apply> would be the best choice, as it can do timestamping
automatically.

One reason I wouldn't use <apply> but <ac:outofdate> instead is that is not
readily apparent that <apply> does the timestamping, and many people don't
know about this feature, whereas it's much more obvious with <outofdate>.

I hope this is not too late to be useful ;-) --DD


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


Mime
View raw message