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

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit f8944fa810878b79522cd96a97e5b52c7b607cdb
Author: Robert Lazarski <[email protected]>
AuthorDate: Sun Apr 19 21:27:42 2026 -1000

    AXIS2-6040 Define Automatic-Module-Name for Java 9+ module system
    
    Add Automatic-Module-Name manifest entry to the root POM's
    maven-jar-plugin configuration. This applies to all modules and
    provides stable module names derived from groupId + artifactId
    (e.g., org.apache.axis2.axis2-kernel).
    
    Without this, the Java module system derives unstable module names
    from JAR filenames, producing IDE warnings like "Name of automatic
    module 'axis2.kernel' is unstable, it is derived from the module's
    file name."
    
    This is a passive manifest entry — ignored entirely on the classpath.
    Only takes effect for users who explicitly use Java modules (JPMS).
---
 pom.xml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/pom.xml b/pom.xml
index 1c286b4c8c..47a4600e49 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1046,6 +1046,16 @@
                 <plugin>
                     <artifactId>maven-jar-plugin</artifactId>
                     <version>3.5.0</version>
+                    <configuration>
+                        <archive>
+                            <manifestEntries>
+                                <!-- AXIS2-6040: Stable module name for Java 
9+ module system.
+                                     Without this, the module name is derived 
from the JAR filename
+                                     and changes with version numbers, 
producing IDE warnings. -->
+                                
<Automatic-Module-Name>${project.groupId}.${project.artifactId}</Automatic-Module-Name>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
                 </plugin>
                 <plugin>
                     <artifactId>maven-plugin-plugin</artifactId>

Reply via email to