Skip to content

Conversation

@dbwiddis
Copy link
Contributor

@dbwiddis dbwiddis commented Jun 1, 2020

To permit modularized projects to access non-modular JARs, Java 9+ allows importing JAR files without a module-info.class as "automatic modules".

Per the ModuleFinder javadoc:

If the JAR file has the attribute "Automatic-Module-Name" in its main manifest then its value is the module name. The module name is otherwise derived from the name of the JAR file.

The automatic name generation without such an entry extracts the version information and then substitutes a dot for all non-alphanumeric characters. In the case of code-assert-0.9.11.jar the resulting module name is code.assert which is illegal due to the reserved word assert, making this project unusable as a module.

This commit leverages the maven-jar-plugin to generate a manifest file including a legal Automatic-Module-Name.

@codecov-commenter
Copy link

codecov-commenter commented Jun 1, 2020

Codecov Report

Merging #40 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #40   +/-   ##
=========================================
  Coverage     81.67%   81.67%           
  Complexity     1139     1139           
=========================================
  Files           105      105           
  Lines          3050     3050           
  Branches        433      433           
=========================================
  Hits           2491     2491           
  Misses          415      415           
  Partials        144      144           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 04a7991...b325bfe. Read the comment docs.

@dbwiddis dbwiddis mentioned this pull request Jun 9, 2020
@nidi3 nidi3 merged commit 4a17102 into nidi3:master Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants