Author: mturk Date: Wed Sep 23 07:59:15 2009 New Revision: 817995 URL: http://svn.apache.org/viewvc?rev=817995&view=rev Log: Improve build version stamps
Modified: commons/sandbox/runtime/trunk/build.xml commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Default.properties commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Properties.java Modified: commons/sandbox/runtime/trunk/build.xml URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=817995&r1=817994&r2=817995&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/build.xml (original) +++ commons/sandbox/runtime/trunk/build.xml Wed Sep 23 07:59:15 2009 @@ -183,7 +183,7 @@ <filter token="VERSION_NUMBER" value="${version.number}"/> <filter token="VERSION_PNAME" value="${final.name}"/> <filter token="VERSION_BUILT" value="${TODAY} ${TSTAMP}"/> - <filter token="VERSION_STAMP" value="${build.uuid}"/> + <filter token="VERSION_UUID" value="${build.uuid}"/> <copy todir="${build.src}/java" filtering="yes"> <fileset dir="${src.dir}/main/java"> <include name="**/*.java"/> @@ -282,7 +282,7 @@ <jar destfile="${build.dir}/${final.name}.jar" basedir="${build.dest}/java" - excludes="**/*.${system.so}" > + excludes="**/*.${systemid.so}" > <manifest> <section name="${runtime.attributes.base}"> <attribute name="Specification-Title" value="Apache Commons Runtime library"/> @@ -302,14 +302,14 @@ <!-- ================================================================== --> <target name="native-jar" depends="compile" description="Generates the Jar file"> - <systemid prefix="system" /> - <copy todir="${build.dest}/java/${runtime.attributes.base}/platform/${system.os}"> + <systemid prefix="systemid" /> + <copy todir="${build.dest}/java/${runtime.attributes.base}/platform/${systemid.os}"> <fileset dir="${runtime.library.path}"> - <include name="*.${system.so}"/> + <include name="*.${systemid.so}"/> </fileset> </copy> <jar - destfile="${build.dir}/${final.name}-${system.os}-${system.cpu}.jar" + destfile="${build.dir}/${final.name}-${systemid.os}-${systemid.cpu}.jar" basedir="${build.dest}/java" > <manifest> <section name="${runtime.attributes.base}"> @@ -322,9 +322,10 @@ <attribute name="Implementation-Version" value="${version} (build ${DSTAMP} ${TSTAMP})"/> </section> <section name="${runtime.attributes.base}/platform"> - <attribute name="Operating-System" value="${runtime.libname}.${system.os}"/> - <attribute name="Machine" value="${runtime.libname}.${system.cpu}"/> - <attribute name="Library" value="${runtime.libname}.${system.so}"/> + <attribute name="Operating-System" value="${systemid.os}"/> + <attribute name="Machine" value="${systemid.cpu}"/> + <attribute name="Library" value="${runtime.libname}.${systemid.so}"/> + <attribute name="Uuid" value="${build.uuid}"/> </section> </manifest> </jar> Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Default.properties URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Default.properties?rev=817995&r1=817994&r2=817995&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Default.properties (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Default.properties Wed Sep 23 07:59:15 2009 @@ -29,8 +29,9 @@ runtime.version.minor = @VERSION_MINOR@ runtime.version.patch = @VERSION_PATCH@ runtime.version.pname = @VERSION_PNAME@ -# Build UUID. -runtime.version.build = @VERSION_STAMP@ +# Build stamps. +runtime.version.built = @VERSION_BUILT@ +runtime.version.uuid = @VERSION_UUID@ # Indicates the caching policy for lookups on cpu object. # The TTL is number of milliseconds between two counter lookups. Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java?rev=817995&r1=817994&r2=817995&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Loader.java Wed Sep 23 07:59:15 2009 @@ -56,7 +56,7 @@ if (path == null) { try { if (SystemId.getSysname().equals("windows")) { - String acr = "_acr-" + Properties.VERSION_BUILD; + String acr = "_acr-" + Properties.VERSION_UUID; path = new File(Utils.getTempPath(), acr); if (path.mkdir()) { /* Delete on exit will work only if library load Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java?rev=817995&r1=817994&r2=817995&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Main.java Wed Sep 23 07:59:15 2009 @@ -49,8 +49,13 @@ Loader.dump(); System.out.println("Initialized Apache Commons Runtime : " + Version.MAJOR + "." + Version.MINOR + "." + - Version.PATCH + " (" + Version.BUILDMARK + ") " + "for " + + Version.PATCH); + System.out.println("Native build : " + + Version.BUILDMARK + " for " + Os.getSysname() + "/" + Os.getMachine()); + System.out.println("Package id : " + + Properties.VERSION_UUID + " (" + + Properties.VERSION_BUILT + ")"); } } catch (Throwable ex) { ex.printStackTrace(); Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Properties.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Properties.java?rev=817995&r1=817994&r2=817995&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Properties.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Properties.java Wed Sep 23 07:59:15 2009 @@ -197,9 +197,15 @@ /** Product name of the runtime library */ public static final String VERSION_PNAME = getS("runtime.version.pname"); - /** Build UUID + /** Build Time stamp. */ - public static final String VERSION_BUILD = getS("runtime.version.build"); + public static final String VERSION_BUILT = getS("runtime.version.built"); + /** Build UUID. + * <p> + * Generated at build time ensurig no two builds have the same signature. + * </p> + */ + public static final String VERSION_UUID = getS("runtime.version.uuid"); /** List of the native libraries to load. */