Sitelet https://github.com/apache/maven-plugin-tools/pull/1213
Skip to content

fix: resolve javadoc redirects before resource lookup - #1213

Open
efegokdemir wants to merge 1 commit into
apache:masterfrom
efegokdemir:codex/issue-1041-javadoc-redirect-resolution
Open

efegokdemir wants to merge 1 commit into
apache:masterfrom
efegokdemir:codex/issue-1041-javadoc-redirect-resolution

Conversation

@efegokdemir

Copy link
Copy Markdown

Summary

Resolve redirects on an external Javadoc base URL before looking up its package-list or element-list. This supports sites that redirect a base URL to an index page instead of forwarding deep resource paths to the corresponding resource.

Changes

  • Resolve the final base URL before constructing package and module resource URLs.
  • Preserve the resolved base URL for generated links.
  • Add a local HTTP regression test covering a base URL redirect to an index page.

Testing

  • mvn -pl maven-plugin-tools-api -Dtest=JavadocSiteTest -Dspotless.apply.skip=true -Dspotless.check.skip=true test — PASS, 27 tests.
  • mvn -pl maven-plugin-tools-api -am -DskipTests -Dspotless.apply.skip=true -Dspotless.check.skip=true verify — PASS.
  • mvn -pl maven-plugin-tools-api -Dspotless.apply.skip=true -Dspotless.check.skip=true test — PASS, 62 tests.
  • git diff --check — PASS.
  • mvn -pl maven-plugin-tools-api spotless:apply — BLOCKED by the repository's existing Palantir formatter/JDK incompatibility (NoSuchFieldError in JCTree$JCCompilationUnit across baseline files).

Notes

  • The regression test uses an in-process HTTP server and does not depend on external network availability.
  • AI assistance was used during preparation; the submitting contributor reviewed the changes and test results.

Fixes #1041

Signed-off-by: Efe Gökdemir <efe@rexcode.co.uk>
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.

Improve redirect detection for javadocs

1 participant