Skip to content

[maven-4.0.x] Test JDK 27 instead of 26 - #13439

Merged
slachiewicz merged 4 commits into
maven-4.0.xfrom
agent/jdk-27-maven-4.0.x
Oct 12, 2026
Merged

slachiewicz merged 4 commits into
maven-4.0.xfrom
agent/jdk-27-maven-4.0.x

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

JDK 26 is out of support now that 27 is released, so the JDK 26 jobs test 27 instead. palantir-java-format crashes on JDK 27 (NoSuchFieldError for JCCompilationUnit.endPositions, palantir/palantir-java-format#1786, not yet released), so a jdk27-skip-spotless profile in the root POM sets spotless.skip for the build, IT and site steps and for local builds on JDK 27; the other JDKs keep checking formatting. Drop the profile once maven-parent ships a fixed palantir-java-format.

The profile is activated by java.specification.version = 27, not by <jdk>: the model builder tests (ComplexActivationTest) build their POMs in a session without a root directory, so RootLocator finds the checkout's .mvn and loads this pom.xml as the reactor root, with system properties that lack java.version. A <jdk> activation is an error there; a property activation stays inactive.

Same change as #13438 and #13442 on master.

Verified: mvn test -pl impl/maven-impl -Dtest=ComplexActivationTest → 1 error with <jdk>[27,)</jdk>, 0 with the property activation.

@slachiewicz slachiewicz added the build Pull requests that change the build process label Oct 12, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review October 12, 2026 12:25

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The bump from JDK 26 to 27 is correct for the current release cycle, the GHA ternary expression is valid, and all three build steps that invoke Spotless (mvn verify -Papache-release, mvn site -Preporting, ./mvnw install -Prun-its,mimir) are consistently updated with the workaround. The initial-build job uses a fixed JDK 17 and is unaffected. The comments clearly document the exit condition (pending a palantir-java-format release in maven-parent). No issues found.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

JDK 26 is out of support now that 27 is released. Spotless is skipped on
the JDK 27 jobs only: palantir-java-format crashes there until
palantir/palantir-java-format#1786 is released.
The profile applies to local builds as well as CI, so the -Dspotless.skip
arguments leave the workflow. Drop it once maven-parent ships a
palantir-java-format that runs on JDK 27 (palantir/palantir-java-format#1786).
The model builder tests in maven-impl build the root POM in sessions
without java.version, where a <jdk> activation is an error.
@slachiewicz
slachiewicz force-pushed the agent/jdk-27-maven-4.0.x branch from 8887ed7 to e6351e6 Compare October 12, 2026 21:15
@slachiewicz
slachiewicz merged commit 2080dfe into maven-4.0.x Oct 12, 2026
21 of 22 checks passed
@slachiewicz
slachiewicz deleted the agent/jdk-27-maven-4.0.x branch October 12, 2026 21:21
@github-actions github-actions Bot added this to the 4.0.0 milestone Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Pull requests that change the build process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants