changeset 1:3d8d789af5c5

Enable build numbers in manifests.
author shade
date Thu, 04 Jul 2013 13:21:56 +0400
parents dd797d922f1c
children 6b09d3c067fc
files harness/pom.xml harness/src/main/java/org/openjdk/jcstress/Main.java tests-all/pom.xml tests-custom/pom.xml tests-generated/pom.xml
diffstat 5 files changed, 85 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/harness/pom.xml	Thu Jul 04 12:32:04 2013 +0400
+++ b/harness/pom.xml	Thu Jul 04 13:21:56 2013 +0400
@@ -35,6 +35,10 @@
     <name>Java Concurrency Stress Tests: Harness</name>
     <url>http://maven.apache.org</url>
 
+    <scm>
+        <connection>scm:hg:http://hg.openjdk.java.net/code-tools/jcstress/</connection>
+    </scm>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
@@ -114,8 +118,6 @@
                     </execution>
                 </executions>
             </plugin>
-<!-- Temporarily disable before we have the actual SCM -->
-<!--
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>buildnumber-maven-plugin</artifactId>
@@ -134,7 +136,6 @@
                     <shortRevisionLength>16</shortRevisionLength>
                 </configuration>
             </plugin>
--->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
--- a/harness/src/main/java/org/openjdk/jcstress/Main.java	Thu Jul 04 12:32:04 2013 +0400
+++ b/harness/src/main/java/org/openjdk/jcstress/Main.java	Thu Jul 04 13:21:56 2013 +0400
@@ -73,7 +73,7 @@
             stream = new URL(manifestPath).openStream();
             Manifest manifest = new Manifest(stream);
             Attributes attr = manifest.getMainAttributes();
-            out.printf("Rev:%s, built by %s with %s at %s\n",
+            out.printf("Rev: %s, built by %s with %s at %s\n",
                     attr.getValue("Implementation-Build"),
                     attr.getValue("Built-By"),
                     attr.getValue("Build-Jdk"),
--- a/tests-all/pom.xml	Thu Jul 04 12:32:04 2013 +0400
+++ b/tests-all/pom.xml	Thu Jul 04 13:21:56 2013 +0400
@@ -35,6 +35,10 @@
     <name>Java Concurrency Stress Tests: All Tests</name>
     <url>http://maven.apache.org</url>
 
+    <scm>
+        <connection>scm:hg:http://hg.openjdk.java.net/code-tools/jcstress/</connection>
+    </scm>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
@@ -95,7 +99,40 @@
                     </execution>
                 </executions>
             </plugin>
-
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>buildnumber-maven-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>create</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <doCheck>false</doCheck>
+                    <doUpdate>false</doUpdate>
+                    <shortRevisionLength>16</shortRevisionLength>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Implementation-Build>${buildNumber}</Implementation-Build>
+                            <Build-Time>${maven.build.timestamp}</Build-Time>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
--- a/tests-custom/pom.xml	Thu Jul 04 12:32:04 2013 +0400
+++ b/tests-custom/pom.xml	Thu Jul 04 13:21:56 2013 +0400
@@ -35,6 +35,10 @@
     <name>Java Concurrency Stress Tests: Custom Tests</name>
     <url>http://maven.apache.org</url>
 
+    <scm>
+        <connection>scm:hg:http://hg.openjdk.java.net/code-tools/jcstress/</connection>
+    </scm>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
@@ -95,8 +99,6 @@
                     </execution>
                 </executions>
             </plugin>
-<!-- Temporarily disable before we have the actual SCM -->
-<!--
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>buildnumber-maven-plugin</artifactId>
@@ -115,7 +117,6 @@
                     <shortRevisionLength>16</shortRevisionLength>
                 </configuration>
             </plugin>
--->
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
@@ -132,7 +133,6 @@
                     </archive>
                 </configuration>
             </plugin>
-
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
--- a/tests-generated/pom.xml	Thu Jul 04 12:32:04 2013 +0400
+++ b/tests-generated/pom.xml	Thu Jul 04 13:21:56 2013 +0400
@@ -35,6 +35,10 @@
     <name>Java Concurrency Stress Tests: Generated Tests</name>
     <url>http://maven.apache.org</url>
 
+    <scm>
+        <connection>scm:hg:http://hg.openjdk.java.net/code-tools/jcstress/</connection>
+    </scm>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
@@ -151,6 +155,40 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>buildnumber-maven-plugin</artifactId>
+                <version>1.1</version>
+                <executions>
+                    <execution>
+                        <phase>generate-resources</phase>
+                        <goals>
+                            <goal>create</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <doCheck>false</doCheck>
+                    <doUpdate>false</doUpdate>
+                    <shortRevisionLength>16</shortRevisionLength>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <archive>
+                        <manifest>
+                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+                        </manifest>
+                        <manifestEntries>
+                            <Implementation-Build>${buildNumber}</Implementation-Build>
+                            <Build-Time>${maven.build.timestamp}</Build-Time>
+                        </manifestEntries>
+                    </archive>
+                </configuration>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-enforcer-plugin</artifactId>
                 <version>1.2</version>