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

Using Failsafe as a JPMS module generates warning during Maven build #295

Closed
duponter opened this issue Sep 9, 2021 · 1 comment
Closed

Comments

@duponter
Copy link
Contributor

duponter commented Sep 9, 2021

When using Failsafe as a dependency in a JPMS compliant application, following warning is issued by Apache Maven 3.8.1 during compilation (using Java version: 11.0.11, vendor: AdoptOpenJDK)

[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ matis-infrastructure ---
[INFO] Required filename-based automodules detected: [failsafe-2.4.3.jar]. Please don't publish this project to a public artifact repository!

Additionally to add the Failsafe dependency in the project's pom file, an entry has to be added to the project's module-info.java.
requires failsafe;

As Failsafe is already OSGi compliant, it is very easy to prevent the aforementioned warning and additionally reserve the same module name as the one already used in OSGi: net.jodah.failsafe.
It merely requires to add the following entry to the leveraged manifest.mf. (I will submit a PR very soon)
Automatic-Module-Name: net.jodah.failsafe

After applying these changes, the Failsafe entry in module-info.java needs to be changed to:
requires net.jodah.failsafe;

@jhalterman
Copy link
Member

Fixed by #296.

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

No branches or pull requests

2 participants