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

Support SemverJ as Version manager #454

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wolframhaussig
Copy link
Contributor

closes #440

  • added dependency semver4j
  • added SemverJVersionManager to prevent breaking change for existing users (default implementation is still DefaultVersionManager => explicit opt-in required)
  • added isStable to VersionManager interface making it easier to only allow snapshots in test environments -> just override AbstractPluginManager.isPluginValid
    • default implementation in interface returns always true to not break existing implementations
  • added test method for DefaultVersionManager for snapshots
  • added tests for SemverJVersionManager

@wolframhaussig wolframhaussig mentioned this pull request Jun 14, 2021
3 tasks
@decebals
Copy link
Member

It's a good PR but for the moment I don't know what to do.
I see that the latest commit on SemverJ was on September 2020 (something in readme). I am afraid that the project will be inactive.
Probably will be a good idea to introduce SemverJ as optional dependency at runtime.

- added dependency semver4j
- added SemverJVersionManager to prevent breaking change for existing users (default implementation is still DefaultVersionManager => explicit opt-in required)
- added isStable to VersionManager interface making it easier to only allow snapshots in test environments(DefaultVersionManager returns always true)
- added test method for DefaultVersionManager for snapshots
- added tests for SemverJVersionManager
…library is named semver4j

- renamed the Test class accordingly
- made semver4j an optional dependency
- updated javadoc of Semver4jVersionManager to make it clear that the semver4j library must be included
@wolframhaussig
Copy link
Contributor Author

I have updated my PR to make the library optional.

Another thought - untested yet: What would you think of using the official maven library: the latest version is from april 2021 and we would always be compatible with the maven versioning.

From what I have found in the javadoc you can:

some example of maven version ranges taken from the javadoc:

  • 1.0 Version 1.0
  • [1.0,2.0) Versions 1.0 (included) to 2.0 (not included)
  • [1.0,2.0] Versions 1.0 to 2.0 (both included)
  • [1.5,) Versions 1.5 and higher
  • (,1.0],[1.2,) Versions up to 1.0 (included) and 1.2 or higher

- added second alternative: MavenVersionManager
- added test for MavenVersionManager
@wolframhaussig
Copy link
Contributor Author

I have added maven as alternative VersionManager - have a look and tell me what you think...

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

Successfully merging this pull request may close these issues.

working with maven release plugin or any plugin with version x.y.z-LABEL
2 participants