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

Implement usage of SemVer ordering rules for resolving previous artifact #172

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

Conversation

UnasZole
Copy link
Contributor

@UnasZole UnasZole commented Jul 9, 2017

As title says, makes it so that resolving the previous artifact follows the ordering rules defined in SemVer 2.0.0 specification ( http://semver.org/spec/v2.0.0.html ).

Not complete yet : I'm planning to add some JUnits on the JApiCmpMojo to validate the changes better, and probably to improve management of error cases.
Still, I wanted to open the PR to get feedback on the principle before finalising everything :-)

Basically :

  • Extends SemanticVersion class with ability to parse according to the spec, and implement Comparable following the spec's rules.
  • Create SemanticArtifactVersion implementing Maven's ArtifactVersion interface.
  • Do some crazy stuff to get these SemanticArtifactVersion inside the maven version range used for comparison.
  • Add a plugin parameter (false by default) to enable this behaviour.

Also, one point to note : I added dependency in test scope to hamcrest matchers in order for my JUnit to use assertThat cleanly, being consistent with your JUnits.
If you are unhappy with the dependency addition, I could rewrite the tests to use good old assertTrue, it's not a big deal :-)

@siom79
Copy link
Owner

siom79 commented Jul 11, 2017

Thank you for providing a pull request. Your implementation looks fine. I would merge the PR once it is finished. Please also extend the documentation under src/site/markdown.

@UnasZole
Copy link
Contributor Author

Thanks for the feedback, and sorry for the late answer :-)
I'll do that as soon as I get a bit of time.

@twogee
Copy link
Contributor

twogee commented Jul 22, 2018

@UnasZole may I help you to complete the PR?

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.

None yet

3 participants