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:

Example:
This loads the basic constants defined in a Java class as Ant properties. 
<loadproperties srcfile="foo.class">
  <filterchain>
    <filterreader classname="org.apache.tools.ant.filters.ClassConstants"/>
  </filterchain>
</loadproperties>

Read the section about FilterChains and FilterReaders in the ANT manual

http://ant.apache.org/manual/CoreTypes/filterchain.html
 
Hope that helps,

Ninju

----- Original Message ----
From: Mikael Petterson (KI/EAB) <[EMAIL PROTECTED]>
To: user@ant.apache.org
Sent: Friday, February 16, 2007 11:27:22 AM
Subject: Jar contains the latest classes


Hi,

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!

Cheers,

//mikael


 
____________________________________________________________________________________
Expecting? Get great news right away with email Auto-Check. 
Try the Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to