docletPath with relative path resolves incorrectly causing AssertionE…#1313
Merged
slachiewicz merged 1 commit intoapache:masterfrom Apr 16, 2026
Merged
docletPath with relative path resolves incorrectly causing AssertionE…#1313slachiewicz merged 1 commit intoapache:masterfrom
slachiewicz merged 1 commit intoapache:masterfrom
Conversation
Contributor
Author
|
@slachiewicz I guess the failure is not related to my commit, saw similar failure on other PRs as well |
Contributor
Author
|
@slachiewicz is there any plan for a new release in coming weeks? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with a relative path is written verbatim to the javadoc options file. The javadoc tool runs from target/reports/testapidocs, so a relative path like target/test-classes resolves to
target/reports/testapidocs/target/test-classes — which doesn't exist. This causes the wrong class to be loaded from the classpath, which on Java 25 triggers a fatal assertion error:
error: fatal error encountered: java.lang.AssertionError: ignored flag: -Xlint:-options
On Java 21 and earlier the wrong class was silently loaded without crashing.
Fix: In AbstractJavadocMojo.getDocletPath(), resolve docletPath entries through JavadocUtil.prunePaths() (which resolves relative paths against project.getBasedir()) instead of passing them verbatim via
unifyPathSeparator(). This is consistent with how other path parameters are already handled.
Note: testJavadocResourcesWithExcludes fails on a second consecutive mvn verify without clean due to a pre-existing stale data/test isolation issue in the suite — unrelated to this fix. mvn clean verify passes.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Checklist status: