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 version of json-smart library to avoid build issue: #8654

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

josegar74
Copy link
Member

@josegar74 josegar74 commented Feb 12, 2025

The build started failing in main and 4.2.x branches:

[ERROR] Failed to execute goal on project gn-core: Could not resolve dependencies for project org.geonetwork-opensource:gn-core:jar:4.4.7-SNAPSHOT: 
Failed to collect dependencies at org.springframework.security:spring-security-oauth2-client:jar:5.8.15 -> com.nimbusds:oauth2-oidc-sdk:jar:9.43.3 -> net.minidev:json-smart:jar:[1.3.3,2.4.10]: 
No versions available for net.minidev:json-smart:jar:[1.3.3,2.4.10] within specified range -> [Help 1]

It's unclear the reason why this is happening now, but seems there are some old reports about this issue:

https://bitbucket.org/connect2id/oauth-2.0-sdk-with-openid-connect-extensions/issues/370/variable-range-of-netminidev-json-smart

New versions of nimbus com.nimbusds:oauth2-oidc-sdk (since 10.14.1) uses a fixed version of json-smart instead of defining a range, fixing the problem. But the spring security version used in GeoNetwork uses an older dependency of nimbus com.nimbusds:oauth2-oidc-sdk that uses a range of versions for json-smart.

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

[ERROR] Failed to execute goal on project gn-core: Could not resolve dependencies for project org.geonetwork-opensource:gn-core:jar:4.4.7-SNAPSHOT: Failed to collect dependencies at org.springframework.security:spring-security-oauth2-client:jar:5.8.15 -> com.nimbusds:oauth2-oidc-sdk:jar:9.43.3 -> net.minidev:json-smart:jar:[1.3.3,2.4.10]: No versions available for net.minidev:json-smart:jar:[1.3.3,2.4.10] within specified range -> [Help 1]
@josegar74 josegar74 added this to the 4.4.7 milestone Feb 12, 2025
@joachimnielandt
Copy link
Collaborator

joachimnielandt commented Feb 12, 2025

Can confirm this works on the VL fork. Thank you for the fix!

@josegar74
Copy link
Member Author

Today the build works again without requiring this change. I'll keep the pull request as draft in case it could happen in the future again.

@josegar74 josegar74 marked this pull request as draft February 13, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants