ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nese Myles <>
Subject RE: ant.jar and Package Version Identification
Date Tue, 06 Feb 2001 21:52:28 GMT
I am interested in this. This goes back to my fuzzy question about how could
Ant have some of kind "versioning task" to slap a build number for every
build that I post for the Developers and QA. For example, the current
release is 1.0. For every build that I post between 1.0 and lets say 1.1, I
need to assign a build number to each of these builds. So instead of
manually labeling the posted build  1.0.r5, I would like to know if there's
a way for  Ant to stamp the build that I produced when I post.

-----Original Message-----
From: Hervé BOUTEMY []
Sent: Tuesday, February 06, 2001 4:11 PM
Subject: ant.jar and Package Version Identification

Since JDK 1.2, package identification version in a JAR file can be included
in the manifest in order to be able to answer to this question : "which
version of the tools is this damn' JAR file I have here ?"
(see JDK's

Here is my try to have this info in ant.jar :
First, I modified src/etc/Manifest :
Manifest-Version: 1.0

Name: org/apache/tools/ant/
Specification-Title: Jakarta Ant
Specification-Version: 1.3
Specification-Vendor: Apache
Implementation-Version: @VERSION@
Implementation-Vendor: Apache @DATE@-@TIME@

Then I modified build.xml's jar task
    <filter token="VERSION" value="${version}" />
    <filter token="DATE" value="${TODAY}" />
    <filter token="TIME" value="${TSTAMP}" />
    <copy  todir="${build.classes}" 
             filtering="on" />
    <jar jarfile="${build.lib}/${name}.jar" 
      <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
      <exclude name="manifest" />

I'm not sure the way I did that is good, but I really think this info should
be included in every JAR file produced in every project.

Does anybody have a better idea for doing this ?
Is anybody interested in doing this ?


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

View raw message