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 support for Java modules (JPMS) #65

Open
viretp opened this issue Feb 7, 2024 · 2 comments
Open

Add support for Java modules (JPMS) #65

viretp opened this issue Feb 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@viretp
Copy link

viretp commented Feb 7, 2024

When using the plugin on a project with a module-info.java file we get following WARNING:

[WARNING] Failed to load class module-info from xxxxxx.jar due to: java.lang.NoClassDefFoundError module-info is not a class because access_flag ACC_MODULE is set

For a java module, the API is defined by the module-info file:

  • the exported packages are part of the API
  • the non-exported packages are NOT part of the API
  • the changes in the non-exported packages should be treated as a patch
  • changes to the list of required modules should be treated like changes to the list of dependencies

I think it would make sense to have a new configuration parameter allowing to check the SemVer semantics on JPMS level or not: even if the project uses JPMS we may want to ensure SemVer for usage without module by non modular applications. But by default it makes sense to work at module level for a project with a module-info file.

@viretp
Copy link
Author

viretp commented Feb 7, 2024

Using version:

[INFO] --- semver-check:0.4.1:check (check) @ xxx-common ---

@jagodevreede
Copy link
Owner

Agreed it should be nice to use modules, my projects don't involve modules yet so it was never an issue. But will look into this.

I've updated the readme with known-limitations and added this there.

Also, version 0.5.0 will no longer complain about the Failed to load class module-info as that "class" is now ignored.

@jagodevreede jagodevreede added the enhancement New feature or request label Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants