ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nese Myles <nmy...@kapoof.com>
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.


thanks
-----Original Message-----
From: Hervé BOUTEMY [mailto:Herve.Boutemy@wanadoo.fr]
Sent: Tuesday, February 06, 2001 4:11 PM
To: ant-dev@jakarta.apache.org
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
docs/guide/versioning/spec/VersioningSpecification.html#PackageVersionSpecif
ication)

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

Name: org/apache/tools/ant/
Specification-Title: Jakarta Ant
Specification-Version: 1.3
Specification-Vendor: Apache
Implementation-Title: org.apache.tools.ant
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}" 
             file="${manifest}"
             overwrite="true"
             filtering="on" />
    <jar jarfile="${build.lib}/${name}.jar" 
         basedir="${build.classes}" 
         manifest="${build.classes}/manifest">
      <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
      <exclude name="manifest" />
    </jar>


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 ?


Herve BOUTEMY


---------------------------------------------------------------------
To unsubscribe, e-mail: ant-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: ant-dev-help@jakarta.apache.org

Mime
View raw message