Add an Automatic-Module-Name manifest entry
See original GitHub issueNow, that Dagger runs with JDK 9 (as issue #880 is resolved), it might be time to look forward to JPMS compatibility.
In a first step I’d suggest to add a Automatic-Module-Name
entry to the jar manifest. This way other libraries depending on Dagger can be published to Maven Central or other repositories. Without it, the automatic module name would be derived from the Dagger .jar file and as such is pretty unreliable.
This proposed change doesn’t affect any code and will simply make a name reservation until an actual module-info.java
will be added eventually. More info can be found in this blog post.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:19 (3 by maintainers)
Top Results From Across the Web
Automatic-Module-Name: Calling all Java Library Maintainers
This first step boils down to picking a module name, and adding it as Automatic-Module-Name: <module name> entry to the library's MANIFEST.
Read more >java - What is an automatic module? - Stack Overflow
The module name of an automatic module is derived from the JAR file used to include the artifact if it has the attribute...
Read more >Add Automatic-Module-Name to MANIFEST.MF #1243 - GitHub
Add Automatic -Module-Name to MANIFEST.MF #1243 ... I believe it's as simple as configuring the maven-jar-plugin entry in the POM:.
Read more >JAR File Specification
A non-modular JAR file deployed on the module path is an automatic module. If the JAR file has a main attribute Automatic-Module-Name (see...
Read more >Add automatic module name entry to MANIFEST.MF in java jar
In Java 9+, jars are supposed to have module names. If they don't (e.g., a jar built from an earlier version of Java),...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just something to bear in mind is that you can’t have two modules with the same name loaded at the same time. The list above suggests you have split packages, where the same package appears in two different jar files. If that is the case, then you can’t really modularise as is.
(The exception to that rule is if the user is expected to choose one of the artifacts, eg one of"dagger-android-jarimpl", “dagger-android-legacy” or “dagger-android-processor”.)
Package name seems more appropriate since it’s agnostic to build system and modules deal in exposing of packages.
On Sun, Mar 4, 2018, 10:59 PM Ron Shapiro notifications@github.com wrote: