ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Kohler" <koh...@cms.tecmath.de>
Subject RE: How do you version jar files?
Date Fri, 16 Nov 2001 08:40:42 GMT
oh,
I forgot to mention that you could put the information also within an
xml file within the jar file.

I'm planning to do that sooner or later, because it allows you to store
more information easily.

For example you store the version numbers of the jar-files the jar file
depends on.
This information could then be used to check if an installation is valid.


Regards,
Markus

> -----Original Message-----
> From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
> Sent: Thursday, November 15, 2001 11:48 PM
> To: Ant Users List
> Subject: RE: How do you version jar files?
>
>
> Scott,
>
> There are a number of ways to version jars depending on your taste.
>
> 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.
>
> I like 3 the least since I prefer, generally, not to modify the source
> coming out of the respository.
>
> I would go with 1 in combination with either 2 or 4. Have a
> look at Ant'2
> build file for an example of 2 in operation.
>
> For option 4, you can use an inline manifest
>
>     <jar file="my.jar">
>       <manifest>
>         <attribute name="MyJarVersion" value="${version}"/>
>
> The version property would best be managed by a
> <propertyfile> task if you
> want it to update with every build, otherwise manage it
> manually by editing
> the build file.
>
> Conor
>
>
> > -----Original Message-----
> > From: Scott Moore [mailto:Scott.Moore@netDecide.com]
> > Sent: Friday, 16 November 2001 6:44 AM
> > To: Ant User (E-mail)
> > Subject: How do you version jar files?
> >
> >
> > Hi All,
> >
> > I would like to solicit people's opinion's on the best way
> to version our
> > Jar files so our deployment people can easily find out the
> > version and build
> > number.  I've seen some jar files include a Version class
> that when run,
> > spits out the version number to stdout.  Is this the best
> way do to that?
> >
> > If so, I would like to have Ant increment and update the build
> > number in the
> > Version.java code.  Looking thru the Ant docs, I see there is a
> > file search
> > and replace text capability, but I didn't see a way to
> increment a build
> > number.  Do I need to write a new Ant task to do this operation?
> >
> > Thanks for any input!
> >
> > Scott
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


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