rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

Use automatic module dependency for javax.inject package #103

Closed jfallows closed 3 years ago

jfallows commented 3 years ago

When building modular components based on airline, the following message is displayed during compilation.

[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ ry ---
[WARNING] ********************************************************************************************************************
[WARNING] * Required filename-based automodules detected. Please don't publish this project to a public artifact repository! *
[WARNING] ********************************************************************************************************************

This is caused by the javax.inject dependency which is missing the Automatic-Module-Name entry from the JAR manifest, so the module name is derived from the JAR filename instead. Although the JAR filename is not expected to change for the javax.inject dependency, a JAR filename is not considered sufficiently stable to derive a module name in the general case, triggering the compilation warning above.

As explained by the Transition from Java EE to Jakarta EE blog post, the javax namespace is migrating to jakarta going forward, so this is a good first step towards fully modular jakarta based dependencies for javax.inject.

This pull request addresses the issue by changing the dependency to use an alternative dependency that delivers an automatic module for javax.inject package instead.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 537


Files with Coverage Reduction New Missed Lines %
airline-core/src/main/java/com/github/rvesse/airline/restrictions/common/PortRangeImpl.java 1 68.97%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build 535: 0.01%
Covered Lines: 5565
Relevant Lines: 7771

πŸ’› - Coveralls
rvesse commented 3 years ago

Thanks for the contribution, I remain pretty ignorant of JPMS so thanks for digging into this and resolving it πŸ‘

jfallows commented 3 years ago

@rvesse when do you think you would be able to roll a 2.8.1 release with these changes please?

rvesse commented 3 years ago

@jfallows Probably next week, busy with security scramble at $dayjob for the sudo CVE atm

rvesse commented 3 years ago

@jfallows Just worked through the release this morning, may take a few hours before the artifacts are visible on Maven central

jfallows commented 3 years ago

@rvesse thanks, I just updated the dependency to 2.8.1 and it is working out great! πŸ‘