Establish Automatic-Module-Name for "library" modules

Description

Java 9+ includes named modules. As people modularise their own applications, they want to start including their dependencies in their own module-info files.

There's a transition mechanism for this in which non-modular .jar artifacts can be promoted to "automatic" modules with names initially based on their file names... which is not necessarily what we will want in all cases. However, once a dependent references a module in this way it's disruptive for them to change.

There's a second mechanism which allows a pre-modular artifact to declare the module name it will use in the future by adding an Automatic-Module-Name declaration in its manifest.

Ideally, we should head this issue off at the pass by figuring out what our future module naming scheme will be, and including Automatic-Module-Name declarations in our artifacts' next releases.

Environment

None

Activity

Show:

Ian YoungOctober 1, 2018 at 2:29 PM

Applied to java-metadata-aggregator (master branch only), commit 8a4913a122acd912089e98f3f6c1789979179534

Ian YoungOctober 1, 2018 at 10:57 AM

Note that for java-identity-provider, although the idp-conf JAR file isn't used in a classpath setting (it isn't bundled into the WAR file) I have given it the automatic module name net.shibboleth.idp.conf anyway so that we don't run into problems later. The issue is that the way I have implemented this (a plugin configuration within idp-parent and definition of properties in each other POM file) the idp-conf JAR would otherwise end up with an empty automatic module name. My concern is that something in the future might decide to look at and fault such a thing.

Ian YoungSeptember 30, 2018 at 9:04 PM

Applied to java-identity-provider, commit ae9bc80b306d1e9691a251d133f445a1ff2424f9

Ian YoungSeptember 29, 2018 at 5:19 PM

Applied to java-opensaml, commit 4d6f2d80b0669a267dbcac7904472af381d2f99c

Ian YoungSeptember 28, 2018 at 5:16 PM

Added a utility to allow display of the automatic module name from a .jar file or from all the .jar files within a given directory.

master branch: commit d789f859c5607c9d5e801bd5b5cc6889803a7765

maint-7 branch: commit 8f5bb48f82912548073df22083694135412c9c10

Completed

Details

Assignee

Reporter

Created March 5, 2018 at 3:51 PM
Updated January 18, 2023 at 1:10 PM
Resolved October 1, 2018 at 2:32 PM