ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject [PATCH] org/apache/tools/ant/taskdefs/Manifest
Date Tue, 04 Aug 2009 20:41:06 GMT

Hi,

Env = WinXP, WindowsServer 2003, jdk1.6.0_14, ant171

after switching from Sun jdk 1.5.0_11 to jdk 1.6.0_14 i noticed that
property java.vm.version has changed, so the Manifest class should use
java.runtime.version for the value of Created-By entry in MANIFEST.MF

jdk 1.5.0_11, Manifest looks like =
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.)
...

jdk 1.5.0_11, java.vm.version property =
1.5.0_11-b03
jdk 1.5.0_11, java.runtime.version property =
1.5.0_11-b03

jdk 1.6.0_14, Manifest looks like =
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.1
Created-By: 14.0-b16 (Sun Microsystems Inc.)
...

jdk 1.6.0_14, java.vm.version property =
14.0-b16
jdk 1.6.0_14, java.runtime.version property =
1.6.0_14-b08


------- patch attached -------

@@ -746,7 +746,7 @@
                 insr = new InputStreamReader(in, "UTF-8");
                 Manifest defaultManifest = new Manifest(insr);
                 Attribute createdBy = new Attribute("Created-By",
-                    System.getProperty("java.vm.version") + " ("
+                    System.getProperty("java.runtime.version") + " ("
                     + System.getProperty("java.vm.vendor") + ")");
                 defaultManifest.getMainSection().storeAttribute(createdBy);
                 return defaultManifest;



Regards, Gilbert

Mime
View raw message