ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Claassen <>
Subject RE: How do you version jar files?
Date Fri, 16 Nov 2001 13:53:19 GMT
Well, I guess I will add my two cents.

I just implemented what I think might turn out to be a pretty good solution.
We will have to see though.

We have one class in our project whose sole purpose is to provide this
information.  Like the example below, a String variable is assigned to
$Name$.  Methods are provided to parse this String and return the
information in different formats.

Additionally, we have a few manifest files which also have the $Name$ in

So, if I am going to make a release...say 3.2 build 20, I tag all my cvs
sources with RELEASE_3_1_20.

My ant target to build a release version prompts for two things: a release
tag and a branch.  I give it the tag RELEASE_3_1_20 and the corresponding
branch tag.  It then checks out the files that need the version information
and compiles the project.  It then compiles the jars with the manifests
files which also have the $Name $ expanded.

After it is done, it checks out the files again, this time on the head of
the branch.  So when it is done building, I am back where I left off.

All my version calls in the code go to this one version class, and all the
jar files have a manifest file entry with the version information.  The
process is more or less automated, thus not relying on my memory to get all
the steps right.

> -----Original Message-----
> From: Peter Davis []
> Sent: Thursday, November 15, 2001 7:01 PM
> To: Ant Users List
> Subject: Re: How do you version jar files?
> Conor MacNeill wrote:
> >I like 3 the least since I prefer, generally, not to modify the source
> >coming out of the respository.
> >
> If you use CVS, then it should be fairly simple to do something like:
> class Version {
>     static final String tag = "$Name$";
> }
> CVS will automatically substitute $Name$ with the tag name used to pull
> the source from CVS (if you are using correctly, then you should be
> tagging each of your releases anyway).
> I don't think this is really a problem because it's done automatically
> and consistantly.
> --
> Furthermore, I believe bacon prevents hair loss.
> Peter Davis
> Developer, Speaklink Inc.
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message