-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
working with maven release plugin or any plugin with version x.y.z-LABEL #440
Comments
One idea is to switch to semver4j, but it's not an easy decision because I don't know how many people use internally the jsemver's API, although they shouldn't because we have VersionManager interface. Maybe it's a good idea to add a PR with another implementation of In the end, related to this NPE. what is wrong in jsemver (the root of the problem)? I ask you because I'm curious. |
@decebals regarding what you wrote about the test that you want to add to DefaultVersionManagerTest - the test should pass expecting the error right ? not fail FYI this passes @Test
public void unsupportedConstraint() {
Assertions.assertTrue(Version.valueOf("1.0.0-SNAPSHOT").greaterThanOrEqualTo(Version.valueOf("1.0.0-SNAPSHOT")));
assertThrows(LexerException.class, () -> versionManager.checkVersionConstraint("1.0.0", ">=1.0.0-SNAPSHOT"));
} |
@asafbennatan jsemver has updated recently. If we need help, we have to create an issue on that project. |
the setup:
lets say i have two plugins
the first is plugin-a-1.0.0-SNAPSHOT.jar and the second is plugin-b-1.0.0.jar ,
now i want to make plugin-b dependent on plugin-a .
usually the best way would be to set a maven property (in plugin-b POM) called plugin-a.version and use it in both the maven dependency section and the Plugin-Dependencies manifest entry so when a version is changed you dont have to change in both places.
now the issue:
if i set plugin-a.version variable as 1.0.0-SNAPSHOT , pf4j complains that:
if i try seperating it into two variables plugin-a.version-full plugin-a.version-numeric then 1.0.0-SNAPSHOT < 1.0.0 (as expected) and the runtime files due to incompatible plugin dependencies.
since maven release plugin is in high usage - what would be the correct way to develop and check plugins with version scheme of x.y.z.-SNAPSHOT?
UPDATE:
ok after some research it seems like the issue is with https://github.com/zafarkhaja/jsemver
which seems like is not being maintened anymore , so i think pf4j should switch semver implementation to a maintained library or roll out its on fork of https://github.com/zafarkhaja/jsemver
one other library option would be https://github.com/asarkar/jsemver though it is not on maven central
The text was updated successfully, but these errors were encountered: