You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2020/11/11 15:15:48 UTC

[commons-math] 02/02: MATH-1562: Add "Automatic-Module-Name" entry to JAR manifest file.

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

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

commit 2da7454c57897184b8e0fe899eb8762e676a15a2
Author: Gilles Sadowski <gi...@gmail.com>
AuthorDate: Wed Nov 11 16:11:44 2020 +0100

    MATH-1562: Add "Automatic-Module-Name" entry to JAR manifest file.
---
 pom.xml                 | 16 +++++++++++++++-
 src/changes/changes.xml |  3 +++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 5a4a761..3f97626 100644
--- a/pom.xml
+++ b/pom.xml
@@ -37,9 +37,10 @@
     <!-- TODO: when releasing 4.0, the properties below need to be updated, and
          the 3.x release artifacts need to be put int commons.release.3  -->
     <commons.componentid>math4</commons.componentid>
-    <commons.module.name>org.apache.commons.math4</commons.module.name>
     <!-- This value must reflect the current name of the base package. -->
     <commons.osgi.symbolicName>org.apache.commons.math4</commons.osgi.symbolicName>
+    <!-- Java 9+ -->
+    <commons.automatic.module.name>org.apache.commons.math4</commons.automatic.module.name>
     <!-- do not use snapshot suffix here -->
     <commons.release.version>3.4.1</commons.release.version>
     <commons.release.desc>(requires Java 1.5+)</commons.release.desc>
@@ -226,6 +227,19 @@
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive combine.children="append">
+            <manifestEntries>
+              <!-- Java 9 -->
+              <Automatic-Module-Name>${commons.automatic.module.name}</Automatic-Module-Name>
+            </manifestEntries>
+          </archive>
+        </configuration>
+      </plugin>
+
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <!-- Fix for OpenJDK 8 now validating class-path attributes in Jar manifests. -->
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 88050ce..28cd6ba 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -54,6 +54,9 @@ If the output is not quite correct, check for invisible trailing spaces!
     </release>
 
     <release version="4.0" date="XXXX-XX-XX" description="">
+      <action dev="erans" type="update" issue="MATH-1562" due-to="Frank Ulbricht">
+        Add "Automatic-Module-Name" entry to JAR manifest file.
+      </action>
       <action dev="erans" type="fix" issue="MATH-1558" due-to="Sam Ritchie">
         "MidPointIntegrator": Fix iterative procedure in order to actually benefit
         from evaluations performed at earlier stages.