Fix Docker build due to missing json-smart version #107

Merged
tozh4728 merged 1 commits from fix-dockerfile-json-smart into develop 2025-02-12 13:28:14 +01:00

1 Commits

Author SHA1 Message Date
f2aef34f5a Fix Docker build due to missing json-smart version
All checks were successful
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 2m43s
Build and test / build-and-test (push) Successful in 15m57s
Remove branch deployment from branch.dsv.su.se / cleanup (pull_request) Successful in 5s
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.8.1:go-offline (default-cli) on project war: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.springframework.boot:spring-boot-starter-oauth2-client:jar:3.4.1 -> org.springframework.security:spring-security-oauth2-client:jar:6.4.2 -> com.nimbusds:oauth2-oidc-sdk:jar:9.43.4 -> 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

With the release 2.5.2 of net.minidev:json-smart the Maven metadata at https://repo1.maven.org/maven2/net/minidev/json-smart/maven-metadata.xml only include the absolute newest version. Compare with the old cached version at https://web.archive.org/web/20240212064759if_/https://repo.maven.apache.org/maven2/net/minidev/json-smart/maven-metadata.xml. This causes issues for Maven's dependency plugin go-offline goal which, for some reason, ignores any dependency version upgrades in <dependencyManagement> and only checks for what's written in the pom.xml of com.nimbus:oauth2-oidc-sdk:9.43.4. Since that pom file requires a version in the  range of 1.3.3 to 2.4.10 none of which are no longer available in the Maven metadata file the goal will fail.

This change removes the dependency caching layer from the Docker build to get around this problem for now. It will slow down Docker builds, but it is what it is.

References:
* https://github.com/netplex/json-smart-v2/issues/240
* https://repo1.maven.org/maven2/net/minidev/json-smart/maven-metadata.xml
* https://web.archive.org/web/20240212064759if_/https://repo.maven.apache.org/maven2/net/minidev/json-smart/maven-metadata.xml
* https://repo1.maven.org/maven2/com/nimbusds/oauth2-oidc-sdk/9.43.4/oauth2-oidc-sdk-9.43.4.pom
2025-02-12 13:09:06 +01:00