aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Is there ant target to check jar version? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Is there ant target to check jar version?" Watch "Is there ant target to check jar version?" New topic
Author

Is there ant target to check jar version?

Dejan Mratinkovic
Ranch Hand

Joined: Nov 20, 2008
Posts: 65
I have ran quickly through ant target list, but couldn't see any target that can check jar version (from manifest file) during the build.

It would be nice if there is something to prevent building application with invalid version of external libraries.

I guess writing custom ant task to do so is not big problem, but is there something out of the box?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

It's not very hard to write a custom Ant task to do something like that. The bigger problem is that jar version manifests aren't very reliable indicators in a free-form build environment like Ant.

You might be better off switching to Maven, which handles jar versions as one of its cornerstone features.


Customer surveys are for companies who didn't pay proper attention to begin with.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Or Ivy, if the Maven hill is too steep a climb.
 
jQuery in Action, 2nd edition
 
subject: Is there ant target to check jar version?