ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maciej Zawadzki" <...@urbancode.com>
Subject RE: How do you version jar files?
Date Fri, 16 Nov 2001 14:08:09 GMT
Hello,

I don't know how open you are to outside tools, but check out Anthill.
Anthill is an extension to Ant and is Open Source.  It is a controlled build
process tool that provides a solution to your question.  Anthill performs a
build of a project whenever it determines that the code base has been
changed.  As part of performing the build, Anthill increments the build
number in a version file and tags the repository with the latest version.

Anthill itself takes approach 1 and 2.  The names of the jar files it
produces can automatically include the appropriate build number.  And, the
file containing the current build number can be automatically included as a
resource in those jar files.  Anthill itself prints out its own build number
at startup using the #2 approach.

You can check out Anthill from the Ant extensions page or you can find it
directly at http://www.urbancode.com/projects/anthill/

Hope this helps.

--Maciej



> 1. Name the jar with the version as part of the name. This is the
> way Ant's
> own jars are distributed.
>
> 2. Add a properties file as a resource to the jar which can then be loaded
> by your code as a resource. Ant also does this.
>
> 3. Munge a version class as you suggested
>
> 4. Add a manifest entry to the jar.


--
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