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
25 stars 2 forks source link

Wrong version compared #66

Closed viretp closed 7 months ago

viretp commented 9 months ago

It seems that the plugin does the check in the wrong direction:

I would expect a minor update when adding a public class.

- after removyl of 2 public classes, I get following message:

[INFO] --- semver-check:0.4.1:check (check) @ xxx-common --- ... [INFO] Checking SemVer against last known version 100.0.0 [WARNING] Failed to load class module-info from xxx-common-100.0.1-viretp-SNAPSHOT.jar due to: java.lang.NoClassDefFoundError module-info is not a class because access_flag ACC_MODULE is set [WARNING] Failed to load class module-info from xxx-common-100.0.0.jar due to: java.lang.NoClassDefFoundError module-info is not a class because access_flag ACC_MODULE is set [INFO] File META-INF/MANIFEST.MF has been changed [INFO] Determined SemVer type as patch and is currently patch, next version should be: 100.0.1


I would expect a major update when removing public classes.

Maybe the problem has to do with the module-info file (see WARNING) ?
jagodevreede commented 9 months ago

I've fixed some bugs in version 0.5.0 regarding non-public classes, and removal of classes/packages. Also, 0.5.0 will no longer have the Failed to load class module-info.

Please test version 0.5.0 if the problem still exists. And if so try running it with debug with mvn -X verify see if the debug logging helps.

jagodevreede commented 7 months ago

This issue is fixed in version 0.5.1, the jar files were swapped in the Maven plugin.