Skip to content

Fix Maven 3.10 JDK 8 surefire failure and bump wrapper to 3.10.0 - #520

Merged
making merged 1 commit into
developfrom
fix/maven-3.10-jdk8-tools
Oct 5, 2026
Merged

making merged 1 commit into
developfrom
fix/maven-3.10-jdk8-tools

Conversation

@making

@making making commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Re-apply the Maven wrapper bump to 3.10.0 (revert in a3bce84)
  • Fix NoClassDefFoundError: com/sun/source/util/TreeScanner in ConstraintMetaProcessorTest on JDK 8

Root cause

compile-testing declares com.sun:tools (system scope, ${java.home}/../lib/tools.jar) only via a file-activated profile in its own POM. Maven 3.10 no longer resolves transitive system-scope dependencies, so on JDK 8 the class disappears from the surefire fork classpath (verified by diffing the booter jar manifests between 3.9.16 and 3.10.0 runs; surefire 3.6.0 is identical in both).

Fix

Declare com.sun:tools as a direct dependency in a jdk1.8-activated profile (direct system-scope deps are still resolved by Maven 3.10; on JDK 9+ com.sun.source comes from the jdk.compiler module).

Verification

Combination Result
Maven 3.10.0 + JDK 8 (Liberica 8.0.432) ConstraintMetaProcessorTest 11/11 green
Maven 3.10.0 + JDK 25 11/11 green
Maven 3.9.16 + JDK 8 (regression) 11/11 green

Full matrix (8/11/17/21) to be confirmed by CI on this PR.

🤖 Generated with Claude Code

compile-testing declares com.sun:tools (system scope, tools.jar) only via
a file-activated profile, and Maven 3.10 no longer resolves transitive
system-scope dependencies. On JDK 8 the surefire fork classpath therefore
lost com.sun.source.util.TreeScanner, breaking ConstraintMetaProcessorTest.

Re-declare com.sun:tools as a direct dependency in a jdk1.8-activated
profile and re-apply the 3.10.0 wrapper bump reverted in a3bce84.

Co-Authored-By: GLM-5.3-Flash-EXL3 <noreply@anthropic.com>
@making
making merged commit ce1d2cf into develop Oct 5, 2026
5 checks passed
@making
making deleted the fix/maven-3.10-jdk8-tools branch October 5, 2026 03:35
making added a commit that referenced this pull request Oct 5, 2026
Co-Authored-By: GLM-5.3-Flash-EXL3 <noreply@anthropic.com>
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.

1 participant