Skip to content

Commit f8944fa

Browse files
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).
1 parent 59b0db4 commit f8944fa

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,16 @@
10461046
<plugin>
10471047
<artifactId>maven-jar-plugin</artifactId>
10481048
<version>3.5.0</version>
1049+
<configuration>
1050+
<archive>
1051+
<manifestEntries>
1052+
<!-- AXIS2-6040: Stable module name for Java 9+ module system.
1053+
Without this, the module name is derived from the JAR filename
1054+
and changes with version numbers, producing IDE warnings. -->
1055+
<Automatic-Module-Name>${project.groupId}.${project.artifactId}</Automatic-Module-Name>
1056+
</manifestEntries>
1057+
</archive>
1058+
</configuration>
10491059
</plugin>
10501060
<plugin>
10511061
<artifactId>maven-plugin-plugin</artifactId>

0 commit comments

Comments
 (0)