cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1424021 - in /cxf/branches/2.5.x-fixes: api/pom.xml common/common/src/main/java/org/apache/cxf/version/Version.java common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
Date Wed, 19 Dec 2012 18:51:45 GMT
Author: dkulp
Date: Wed Dec 19 18:51:45 2012
New Revision: 1424021

URL: http://svn.apache.org/viewvc?rev=1424021&view=rev
Log:
Merged revisions 1423176 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes

........
  r1423176 | dkulp | 2012-12-17 16:57:59 -0500 (Mon, 17 Dec 2012) | 10 lines

  Merged revisions 1423175 via  git cherry-pick from
  https://svn.apache.org/repos/asf/cxf/trunk

  ........
    r1423175 | dkulp | 2012-12-17 16:55:03 -0500 (Mon, 17 Dec 2012) | 2 lines

    If using a SNAPSHOT version, output the svn rev# or git hash into the version string to
get some sort of idea of what version we are dealing with.

  ........

........

Modified:
    cxf/branches/2.5.x-fixes/api/pom.xml
    cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
    cxf/branches/2.5.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties

Modified: cxf/branches/2.5.x-fixes/api/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/api/pom.xml?rev=1424021&r1=1424020&r2=1424021&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/api/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/api/pom.xml Wed Dec 19 18:51:45 2012
@@ -32,6 +32,10 @@
         <version>2.5.8-SNAPSHOT</version>
         <relativePath>../parent/pom.xml</relativePath>
     </parent>
+    
+    <properties>
+        <buildnumber.connection.url>${project.scm.developerConnection}</buildnumber.connection.url>
+    </properties>
 
     <dependencies>
         <dependency>
@@ -93,6 +97,35 @@
     <build>
         <plugins>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>buildnumber-maven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>create-noncanonicalrev</id>
+                            <goals>
+                                <goal>create-timestamp</goal>
+                            </goals>
+                        <configuration>
+                            <timestampFormat>'NON-CANONICAL_'yyyy-MM-dd_HH-mm_'${user.name}'</timestampFormat>
+                            <timestampPropertyName>nonCanonicalRevision</timestampPropertyName>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>create-buildnumber</id>
+                            <goals>
+                                <goal>create</goal>
+                            </goals>
+                            <configuration>
+                                <doCheck>false</doCheck>
+                                <doUpdate>false</doUpdate>
+                                <urlScm>${buildnumber.connection.url}</urlScm>
+                                <revisionOnScmFailure>${nonCanonicalRevision}</revisionOnScmFailure>
+                            </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.cxf</groupId>
                 <artifactId>cxf-xjc-plugin</artifactId>
                 <version>${cxf.xjc-utils.version}</version>
@@ -239,6 +272,18 @@
                 </dependency>
             </dependencies>
         </profile>
+        <profile>
+            <!-- default profile enables javadoc stuff -->
+            <id>git.build.number</id>
+            <activation>
+                <file>
+                    <exists>../.git</exists>
+                </file>
+            </activation>
+            <properties>
+                <buildnumber.connection.url>scm:git:http://</buildnumber.connection.url>
+            </properties>
+        </profile>
     </profiles>
 
 </project>

Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java?rev=1424021&r1=1424020&r2=1424021&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
(original)
+++ cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/version/Version.java
Wed Dec 19 18:51:45 2012
@@ -27,6 +27,7 @@ public final class Version {
     private static String version;
     private static String name;
     private static String fullVersion;
+    private static String buildNumber;
     
     private static final String VERSION_BASE = "/org/apache/cxf/version/";
 
@@ -57,7 +58,13 @@ public final class Version {
 
             version = p.getProperty("product.version", "<unknown>");
             name = p.getProperty("product.name", "Apache CXF");
-            fullVersion = name + " " + version;
+            buildNumber = p.getProperty("build.number", "<unknown>");
+            if (version.contains("SNAPSHOT") 
+                || version.contains("<unknown>")) {
+                fullVersion = name + " " + version + " (" + buildNumber + ")";
+            } else {
+                fullVersion = name + " " + version;
+            }
         }
     }
 

Modified: cxf/branches/2.5.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties?rev=1424021&r1=1424020&r2=1424021&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
(original)
+++ cxf/branches/2.5.x-fixes/common/common/src/main/resources-filtered/org/apache/cxf/version/version.properties
Wed Dec 19 18:51:45 2012
@@ -19,4 +19,5 @@
 #
 #
 product.version=${project.version}
-product.name=Apache CXF
\ No newline at end of file
+product.name=Apache CXF
+build.number=${buildNumber}
\ No newline at end of file



Mime
View raw message