You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ah...@apache.org on 2022/12/02 11:59:22 UTC

[commons-numbers] branch master updated (a03c18bb -> 0edc64a7)

This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git


    from a03c18bb Exclude development files from source distribution
     new 71a14786 Update to use commons.module.name (consitent with CP)
     new 0edc64a7 Fix git build number in manifest

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 commons-numbers-examples/examples-jmh/pom.xml |  2 +-
 commons-numbers-examples/pom.xml              |  2 +-
 pom.xml                                       | 48 +++++++++------------------
 3 files changed, 18 insertions(+), 34 deletions(-)


[commons-numbers] 02/02: Fix git build number in manifest

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 0edc64a7b3ea83a5f2f96a739d237112fb729277
Author: aherbert <ah...@apache.org>
AuthorDate: Fri Dec 2 11:55:09 2022 +0000

    Fix git build number in manifest
---
 pom.xml | 48 ++++++++++++++++--------------------------------
 1 file changed, 16 insertions(+), 32 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5be77b24..90fa816e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,11 +79,6 @@
     <commons.scmPubUrl>https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-numbers</commons.scmPubUrl>
     <commons.scmPubCheckoutDirectory>site-content</commons.scmPubCheckoutDirectory>
 
-    <!-- Temporary fix to replace svn-based build number with git-based build number -->
-    <buildnumber.skip>true</buildnumber.skip>
-    <numbers.jgit.buildnumber.version>1.2.10</numbers.jgit.buildnumber.version>
-    <implementation.build>${git.revision}; ${maven.build.timestamp}</implementation.build>
-
     <!--
         Override so that "mvn commons:download-page" will generates a web page
         referring to the files created by the "dist-archive" module.
@@ -356,10 +351,26 @@
           <archive combine.children="append">
             <manifestEntries>
               <Automatic-Module-Name>${commons.module.name}</Automatic-Module-Name>
+              <!-- Add entries from CP that are not inherited (for reasons unknown).
+                   Replace ${implementation.build} property with the unique git build number. -->
+              <Implementation-Vendor-Id>org.apache</Implementation-Vendor-Id>
+              <Implementation-Build>${buildNumber}; ${maven.build.timestamp}</Implementation-Build>
+              <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
+              <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
             </manifestEntries>
           </archive>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>buildnumber-maven-plugin</artifactId>
+        <configuration>
+          <!-- buildnumber-maven-plugin:
+            "for git getLastChangedRevision() returns null instead of the last revision"
+            Override CP to use the last revision of the repository (OK for release jars). -->
+          <useLastCommittedRevision>false</useLastCommittedRevision>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
@@ -470,33 +481,6 @@
   </reporting>
 
   <profiles>
-    <profile>
-      <id>jgit-buildnumber</id>
-      <activation>
-        <file>
-          <exists>.git</exists>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>ru.concerteza.buildnumber</groupId>
-            <artifactId>maven-jgit-buildnumber-plugin</artifactId>
-            <version>${numbers.jgit.buildnumber.version}</version>
-            <executions>
-              <execution>
-                <phase>generate-resources</phase>
-                <goals>
-                  <goal>extract-buildnumber</goal>
-                </goals>
-              </execution>
-            </executions>
-            <configuration>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
     <profile>
       <!-- Override a parent property if the SVN site checkout should not be performed.
            This should activate for child modules. -->


[commons-numbers] 01/02: Update to use commons.module.name (consitent with CP)

Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git

commit 71a14786f67bd5d2381c1603da67a1fcb10137c9
Author: aherbert <ah...@apache.org>
AuthorDate: Fri Dec 2 11:38:14 2022 +0000

    Update to use commons.module.name (consitent with CP)
---
 commons-numbers-examples/examples-jmh/pom.xml | 2 +-
 commons-numbers-examples/pom.xml              | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/commons-numbers-examples/examples-jmh/pom.xml b/commons-numbers-examples/examples-jmh/pom.xml
index ab519301..a7966559 100644
--- a/commons-numbers-examples/examples-jmh/pom.xml
+++ b/commons-numbers-examples/examples-jmh/pom.xml
@@ -93,7 +93,7 @@
     <commons.osgi.symbolicName>org.apache.commons.numbers.examples.jmh</commons.osgi.symbolicName>
     <commons.osgi.export>org.apache.commons.numbers.examples.jmh</commons.osgi.export>
     <!-- Java 9+ -->
-    <commons.automatic.module.name>org.apache.commons.numbers.examples.jmh</commons.automatic.module.name>
+    <commons.module.name>org.apache.commons.numbers.examples.jmh</commons.module.name>
     <!-- Workaround to avoid duplicating config files. -->
     <numbers.parent.dir>${basedir}/../..</numbers.parent.dir>
 
diff --git a/commons-numbers-examples/pom.xml b/commons-numbers-examples/pom.xml
index 4da22327..cc07545e 100644
--- a/commons-numbers-examples/pom.xml
+++ b/commons-numbers-examples/pom.xml
@@ -38,7 +38,7 @@
     <commons.osgi.symbolicName>org.apache.commons.numbers.examples</commons.osgi.symbolicName>
     <commons.osgi.export>org.apache.commons.numbers.examples</commons.osgi.export>
     <!-- Java 9+ -->
-    <commons.automatic.module.name>org.apache.commons.numbers.examples</commons.automatic.module.name>
+    <commons.module.name>org.apache.commons.numbers.examples</commons.module.name>
     <!-- Workaround to avoid duplicating config files. -->
     <numbers.parent.dir>${basedir}/..</numbers.parent.dir>
     <numbers.jira.component>examples</numbers.jira.component>