martinaldrin opened a new pull request, #1313: URL: https://github.com/apache/maven-javadoc-plugin/pull/1313
<docletPath> 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: - ✅ Addresses one issue only - ✅ Unit test added: JavadocUtilTest.testPrunePathsResolvesRelativePaths() — fails without the fix, passes with it - ✅ mvn clean verify passes - ⚠️ Integration tests (mvn -Prun-its verify) — please indicate if you've run these - ✅ ~10 lines of code change — no ICLA required - ✅ Licensed under Apache License 2.0 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
