[CURATOR-550] Add Automatic-Module-Name to MANIFEST.MF
Add Automatic-Module-Name to the project jars in support of the Java 9 module system.
I am opening this ticket because Accumulo requires its dependencies to have stable module names before it can release modules of its own. Here is some discussion and more information about this topic: https://github.com/apache/accumulo/issues/1434
Originally reported by milleruntime, imported from: Add Automatic-Module-Name to MANIFEST.MF
- assignee: randgalt
- status: Open
- priority: Major
- resolution: Unresolved
- imported: 2025-01-21
Is anyone in the real-world using the module path? No one I know has any plans to. I'm concerned that trying to be module complaint is a can of worms. But, TBH, I don't know all the details. I've just read blog posts about how difficult it can be.
I don't know of any projects with clearly defined modules using module-info. There are however, projects that have included the Automatic-Module-Name as a first step to create a stable module name for other projects to use. For example, Apache Commons lang3 has done this:
From what I have read about modules, it seems like it would be easier for new projects to began with code organized into different modules, where it would be much more difficult for established projects. As for being module complaint, I am not sure what that means but I do know that having a stable name (set with Automatic-Module-Name vs one derived from a Jar name) helps other projects using modules.
Note that adding an automatic module name can be as easy as adding (on the example of curator-framework)
<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>org.apache.curator.framework</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
to pom.xml.