Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Automatic-Module-Name to all manifest files #1242

Closed
shakuzen opened this issue Feb 20, 2019 · 4 comments
Closed

Add Automatic-Module-Name to all manifest files #1242

shakuzen opened this issue Feb 20, 2019 · 4 comments
Labels
build A change in our build-system type: task A general task
Milestone

Comments

@shakuzen
Copy link
Member

While we haven't modularized Micrometer itself, we can still set a stable automatic module name for each of our produced artifacts and declare it in the manifest file. This will ensure the Micrometer artifacts' module names can be reliably used by those who are modularizing their applications and using Micrometer.

There seem to be two formulas folks are using to pick their module names. Without an Automatic-Module-Name specified or an actual module-info file, the JAR file name will be used to make an automatic module by converting hyphens - to dots .. Some choose to make this their declared automatic module name (e.g. spring.beans); others choose to add in their group ID in front of this (e.g. org.junit.jupiter.api).

Note: If there are users on the module path depending on our JAR name-derived automatic module name, we would break them by choosing something else - they would have to change the name when upgrading to the version we declare something else explicitly to be our module name.

See https://dzone.com/articles/automatic-module-name-calling-all-java-library-maintainers

@shakuzen shakuzen added the type: task A general task label Feb 20, 2019
@shakuzen shakuzen added this to the 1.2.0 milestone Feb 20, 2019
@shakuzen shakuzen modified the milestones: 1.2.0 (non-LTS), 1.3.0 Jun 17, 2019
@shakuzen shakuzen modified the milestones: 1.3.0, 1.4.0 Sep 29, 2019
@shakuzen shakuzen modified the milestones: 1.4.0, 1.5.0 Mar 8, 2020
@JonathanGiles
Copy link

It would be great get this introduced in some form to lessen the warnings seen when building projects in JDK9+, e.g.

[WARNING] *************************************************************************************************************************************************
[WARNING] * Required filename-based automodules detected: [micrometer-core-1.2.0.jar]. Please don't publish this project to a public artifact repository! *
[WARNING] *************************************************************************************************************************************************

@shakuzen
Copy link
Member Author

Seems we have a decision to make regarding what our automatic-module-names specifically are. I'm seeing 3 likely options:

  • short project names e.g. micrometer.core, micrometer.registry.whatever
  • reverse-DNS style based on artifact names io.micrometer.core / io.micrometer.registry.whatever
  • reverse-DNS style based on root package name io.micrometer.core / io.micrometer.whatever (unlike previous option, no registry in there)

I'm leaning towards one of the latter two, even though it would differ from the implicit automatic-module-names now.

@JonathanGiles
Copy link

I would go with first or second personally, and probably the first is best IMHO.

@shakuzen
Copy link
Member Author

I have gone with the short project names which will match the filename-based automatic modules. This should not break any existing users of our automatic modules.

@shakuzen shakuzen added the build A change in our build-system label Apr 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build A change in our build-system type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants