Automatic-Module-Name was removed, breaking JPMS compatibility
Description
After upgrading KeePassJava2 from 2.1.4 to 2.2.4, my project no longer builds when using the Java Platform Module System (JPMS).
In version 2.1.4, each module JAR included the Automatic-Module-Name manifest entry, for example:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.linguafranca.pwdb.kdbx</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
This allowed consumers using JPMS to reliably require the module by its stable name:
requires org.linguafranca.pwdb.kdbx;
However, this configuration appears to have been removed in 2.2.4. As a result, the JAR no longer contains the Automatic-Module-Name manifest entry, and Java derives an automatic module name from the JAR filename instead. The generated name is different and contains not allowed chars, making it impossible to use.
Expected behavior
The published JARs should continue to expose the same stable automatic module names as previous releases, preserving backward compatibility for JPMS users.
Suggested fix
Restore the Automatic-Module-Name manifest entry in each submodule's pom.xml, as it existed in previous releases:
Example
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.linguafranca.pwdb.kdbx</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
This is a non-breaking change for non-JPMS users while restoring compatibility for projects that rely on stable automatic module names.
Automatic-Module-Name was removed, breaking JPMS compatibility
Description
After upgrading KeePassJava2 from 2.1.4 to 2.2.4, my project no longer builds when using the Java Platform Module System (JPMS).
In version 2.1.4, each module JAR included the
Automatic-Module-Namemanifest entry, for example:This allowed consumers using JPMS to reliably require the module by its stable name:
However, this configuration appears to have been removed in 2.2.4. As a result, the JAR no longer contains the
Automatic-Module-Namemanifest entry, and Java derives an automatic module name from the JAR filename instead. The generated name is different and contains not allowed chars, making it impossible to use.Expected behavior
The published JARs should continue to expose the same stable automatic module names as previous releases, preserving backward compatibility for JPMS users.
Suggested fix
Restore the
Automatic-Module-Namemanifest entry in each submodule'spom.xml, as it existed in previous releases:Example
This is a non-breaking change for non-JPMS users while restoring compatibility for projects that rely on stable automatic module names.