Skip to content

Fix Maven metadata repository fallback mutation#914

Draft
jormundur00 wants to merge 1 commit into
graalvm:masterfrom
jormundur00:rhei/issue-913
Draft

Fix Maven metadata repository fallback mutation#914
jormundur00 wants to merge 1 commit into
graalvm:masterfrom
jormundur00:rhei/issue-913

Conversation

@jormundur00

Copy link
Copy Markdown
Member

Issue

Resolves #913.

Spec-fit summary

This keeps Maven reachability metadata repository resolution aligned with the existing Maven metadata repository behavior: fallback URLs are used for downloading metadata without mutating the Maven metadata repository configuration object. Explicit localPath, url, and version configuration behavior remains covered by the existing metadata functional tests.

Implementation summary

  • Removed the two metadataRepositoryConfiguration.setUrl(targetUrl) fallback mutations in AbstractNativeMojo.
  • Removed the stale TODO comments that referenced issue 560.
  • Added focused Spock coverage for the default metadata repository fallback path when Maven artifact resolution cannot resolve the default metadata artifact.

Validation evidence

Passed locally:

  • git diff --check
  • grund check
  • grund fmt . --marker --check
  • JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal PATH=/home/jovan/.sdkman/candidates/java/17.0.12-graal/bin:$PATH ./gradlew :native-maven-plugin:test --tests org.graalvm.buildtools.maven.AbstractNativeMojoTest
  • JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal GRAALVM_HOME=/home/jovan/.sdkman/candidates/java/21.0.11-graal PATH=/home/jovan/.sdkman/candidates/java/17.0.12-graal/bin:$PATH ./gradlew :native-maven-plugin:functionalTest --tests "org.graalvm.buildtools.maven.*Metadata*"
  • JAVA_HOME=/home/jovan/.sdkman/candidates/java/17.0.12-graal PATH=/home/jovan/.sdkman/candidates/java/17.0.12-graal/bin:$PATH ./gradlew :native-maven-plugin:inspections

Review readiness

Draft PR. The latest local review found no blocking findings and marked the change ready to publish.

Remaining human follow-up

Full repository CI and the full :native-maven-plugin:functionalTest matrix were not run locally; rely on repository CI or run those broader checks before merge.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement. rhei

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate Maven metadata repository fallback URL mutation

1 participant