maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject [6/30] git commit: [MNG-5402] Better build number for git
Date Sun, 09 Dec 2012 02:51:51 GMT
[MNG-5402] Better build number for git

Signed-off-by: Anders Hammar <anders@hammar.net>


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f95ab2e7
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f95ab2e7
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f95ab2e7

Branch: refs/heads/slf4j-logback
Commit: f95ab2e7cdb488442ab923abe6ec856efc993dd3
Parents: 19492b4
Author: Anders Hammar <anders@hammar.net>
Authored: Wed Dec 5 14:21:04 2012 +0100
Committer: Anders Hammar <anders@hammar.net>
Committed: Wed Dec 5 14:21:04 2012 +0100

----------------------------------------------------------------------
 maven-core/pom.xml                                 |   86 ++++-----------
 .../org/apache/maven/cli/CLIReportingUtils.java    |    2 +-
 pom.xml                                            |    2 +-
 3 files changed, 25 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f95ab2e7/maven-core/pom.xml
----------------------------------------------------------------------
diff --git a/maven-core/pom.xml b/maven-core/pom.xml
index 41e2079..3e18639 100644
--- a/maven-core/pom.xml
+++ b/maven-core/pom.xml
@@ -124,73 +124,33 @@
           </models>
         </configuration>
       </plugin>
-    </plugins>
-  </build>
-
-  <profiles>
-    <profile>
-      <id>svn-buildnumber</id>
-      <activation>
-        <file>
-          <exists>.svn</exists>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>buildnumber-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>generate-resources</phase>
-                <goals>
-                  <goal>create</goal>
-                </goals>
-              </execution>
-            </executions>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>create-noncanonicalrev</id>
+            <goals>
+              <goal>create-timestamp</goal>
+            </goals>
             <configuration>
-              <doCheck>false</doCheck>
-              <doUpdate>false</doUpdate>
-              <providerImplementations>
-                <svn>javasvn</svn>
-              </providerImplementations> 
+              <timestampFormat>'NON-CANONICAL_'yyyy-MM-dd_HH-mm_'${user.name}'</timestampFormat>
+              <timestampPropertyName>nonCanonicalRevision</timestampPropertyName>
             </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
-      <id>non-canonical-buildnumber</id>
-      <activation>
-        <file>
-          <missing>.svn</missing>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>buildnumber-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>generate-resources</phase>
-                <goals>
-                  <goal>create</goal>
-                </goals>
-              </execution>
-            </executions>
+          </execution>
+          <execution>
+            <id>create-buildnumber</id>
+            <goals>
+              <goal>create</goal>
+            </goals>
             <configuration>
               <doCheck>false</doCheck>
               <doUpdate>false</doUpdate>
-              <format>NON-CANONICAL_{0,date,yyyy-MM-dd_HH-mm}_{1}</format>
-              <items>
-                <item>timestamp</item>
-                <item>${user.name}</item>
-              </items>
+              <revisionOnScmFailure>${nonCanonicalRevision}</revisionOnScmFailure>
             </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
 </project>

http://git-wip-us.apache.org/repos/asf/maven/blob/f95ab2e7/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index 8f1ae8e..6173959 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -83,7 +83,7 @@ public final class CLIReportingUtils
         if ( rev != null || timestamp != null )
         {
             msg += " (";
-            msg += ( rev != null ? "r" + rev : "" );
+            msg += ( rev != null ? rev : "" );
             if ( timestamp != null )
             {
                 SimpleDateFormat fmt = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ssZ" );

http://git-wip-us.apache.org/repos/asf/maven/blob/f95ab2e7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e32d6dc..d673939 100644
--- a/pom.xml
+++ b/pom.xml
@@ -398,7 +398,7 @@
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>buildnumber-maven-plugin</artifactId>
-          <version>1.0</version>
+          <version>1.2</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>


Mime
View raw message