Skip to content

Build against Maven 4.0.0-rc-6 - #574

Closed
slachiewicz wants to merge 2 commits into
apache:masterfrom
slachiewicz:maven-4.0.0-rc-6
Closed

Build against Maven 4.0.0-rc-6#574
slachiewicz wants to merge 2 commits into
apache:masterfrom
slachiewicz:maven-4.0.0-rc-6

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Moves mavenVersion to the current RC and pins the same version explicitly in the Verify workflow, so CI no longer depends on the maven4-version default in maven-gh-actions-shared.

The version bump alone made JarMojoTest fail:

JarMojoTest.jarTestEnvironment:48 expected: <foo> but was: <myGroupId>

rc-6 relocated org.apache.maven.api.plugin.testing to org.apache.maven.testing.plugin. The old names survive as deprecated shims, so the test still compiled — but MojoExtension's annotation lookup only recognises the new annotation types. With the old ones the @InjectMojo attributes come back null, the @Basedir pom is never read, and the mojo is handed MojoExtension's built-in default model. Pointing the imports at the new package restores it; no production code changes.

Worth flagging generally: this is a silent behavioural break, not a compile error, so any plugin still importing the deprecated package will keep building and quietly stop reading its test poms. Same relocation as apache/maven-compiler-plugin#1104.

Part of apache/maven#12676. Verified green on a fork before opening.

slachiewicz and others added 2 commits August 4, 2026 02:17
Move the Maven 4 version property to the current RC and pin the same
version explicitly in the Verify workflow, so CI does not depend on the
maven4-version default in maven-gh-actions-shared.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
rc-6 relocated org.apache.maven.api.plugin.testing to
org.apache.maven.testing.plugin. The old names survive as deprecated
shims, so this still compiled — but MojoExtension's annotation lookup only
recognises the new annotation types. With the old ones the @InjectMojo
attributes come back null, the @baseDir pom is never read, and the mojo is
handed MojoExtension's built-in default model instead:

  JarMojoTest.jarTestEnvironment:48 expected: <foo> but was: <myGroupId>

Pointing the imports at the new package restores it. Same relocation as
apache/maven-compiler-plugin#1104.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@slachiewicz

Copy link
Copy Markdown
Member Author

Superseded by #573, which is already merged and makes exactly the same three changes — ff-maven/maven-matrix to rc-6, mavenVersion to rc-6, and the org.apache.maven.testing.plugin import relocation. Closing.

@slachiewicz slachiewicz closed this Aug 4, 2026
@slachiewicz
slachiewicz deleted the maven-4.0.0-rc-6 branch August 4, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant