jagodevreede / semver-check

A maven plugin that allows you to check (or determine) the next version of your module, based on the rules of Semantic Versioning.
Apache License 2.0
24 stars 2 forks source link

Add support for Java modules (JPMS) #65

Open viretp opened 7 months ago

viretp commented 7 months ago

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:

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 commented 7 months ago

Using version:

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

jagodevreede commented 7 months ago

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.