Support Ex-Jakarta |
The Java(tm) Product Versioning Specification allows users to identify the exact version information of a package within a JAR. This is particularly useful when users have a number of packages, with version interdependences, from various distributions. These four simple steps use Ant to maintain and insert the versioning information, so all JARs shipped are correctly versioned. Note: This is just one method, and in future releases Ant may have built in mechanisms for this task. Step 1: Manually create a template manifest file.Java versioning is implemented by attributes set within the manifest of the JAR. See Javasoft's documentation on: JAR Manifest Format
Save this with your build.xml as a file called manifest.template.
Note: The {Apache Package} ought be manually replaced by the package name, e.g. "log4j" or "Axis" Step 2: Maintain the version in your Ant build scriptSet and maintain the ${version} property.
Step 3: Create the manifest, filtering the versionThis replaces @version@ in manifest.template with 1-1-1 in manifest.mf.
Step 4: Create your JAR, setting the manifest attributeThis sets the META-INF/manifest.mf in the JAR file.
Sample Files: manifest.template, build.xml |
About Jakarta About Apache
Retired Subprojects |
||||
|
||||||