ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <>
Subject Re: Jar contains the latest classes
Date Sat, 17 Feb 2007 17:42:30 GMT
You may want to look at the <loadproperties> task along with the ClassConstants filterReader
class.  If you jar contains a class file that has simple public JAVA constants (maybe a constant
that is the build time/version number perhaps) you than can use the following target snippit
to read load up all the constants from the class file as ANT properties:

This loads the basic constants defined in a Java class as Ant properties. 
<loadproperties srcfile="foo.class">
    <filterreader classname=""/>

Read the section about FilterChains and FilterReaders in the ANT manual
Hope that helps,


----- Original Message ----
From: Mikael Petterson (KI/EAB) <>
Sent: Friday, February 16, 2007 11:27:22 AM
Subject: Jar contains the latest classes


In my ant build file I have to check if a streamer.jar  ( my project
depends on streamer.jar ) contains the latest of classes. If not I have
to update the jar file.
How can I do that in ant. I have acess to source for streamer too.

All hints are very much welcome!



Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta. 

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

View raw message