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

fix: prevent maven from using jackson3 snapshot #625

Merged
merged 2 commits into from Aug 25, 2022

Conversation

iProdigy
Copy link
Member

@iProdigy iProdigy commented Aug 20, 2022

Prerequisites for Code Changes

  • This pull request follows the code style of the project
  • I have tested this feature

Issues Fixed

  • Maven users that have added a repository to their pom that offers a 3.x snapshot version of jackson have an incompatible version of jackson resolved via the rich version declaration

Changes Proposed

  • Fully exclude jackson 3.x (incl. snapshots) in the rich version declaration
  • Bump preferred version of jackson to 2.13.3

Additional Information

In the rich version declaration, we exclude jackson 3.x

However, maven resolves: 3-snapshot < 3, so it allows 3.0.0-SNAPSHOT to be selected

Further, maven ignores the prefer version in the presence of strictly, unlike gradle (explaining why gradle users did not encounter this problem)

 

$ java -jar maven-artifact.jar 2.12 2.12.0 2.13.3 3-alpha 3.0-SNAPSHOT 3.0.0

Display parameters as parsed by Maven (in canonical form) and comparison result:
1. 2.12 == 2.12
   2.12 == 2.12.0
2. 2.12.0 == 2.12
   2.12.0 < 2.13.3
3. 2.13.3 == 2.13.3
   2.13.3 < 3-alpha
4. 3-alpha == 3-alpha
   3-alpha < 3.0-SNAPSHOT
5. 3.0-SNAPSHOT == 3-snapshot
   3.0-SNAPSHOT < 3.0.0
6. 3.0.0 == 3

@iProdigy iProdigy added the dependencies Pull requests that update a dependency file label Aug 20, 2022
build.gradle.kts Show resolved Hide resolved
@iProdigy iProdigy merged commit 10ce56e into develop Aug 25, 2022
@iProdigy iProdigy deleted the fix/jackson-version-maven-snapshot branch August 25, 2022 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants