Build against Maven 4.0.0-rc-6, and honour <skip> on testResources - #500
Merged
Conversation
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>
MRESOURCES-131 sets <skip>true</skip> in pluginManagement and asserts the test resource is not copied. It has been failing since 4.0.0-rc-5: the main resources goal skips, testResources does not. Both ResourcesMojo and TestResourcesMojo declare a private field named "skip". They collapse into a single descriptor parameter for the testResources goal, and the configurator writes the superclass field — so this class's own field stays false no matter what the build configured, and the guard never fires. Reading both restores the documented behaviour while keeping maven.test.skip and maven.resources.skip working as before. Renaming the field so the two stop shadowing does not work: the descriptor generator then sees two parameters called "skip" for one goal and fails with "skip has been declared multiple times in mojo with goal: testResources". mvn verify -Prun-its: all ITs pass, 24 unit tests, 0 failures. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
desruisseaux
reviewed
Aug 4, 2026
apache/maven#12626 fixes the cause in the core configurator, so record what lets this be removed rather than leaving it to be rediscovered. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
desruisseaux
approved these changes
Aug 4, 2026
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.
Moves
mavenVersionto the current RC and pins the same version explicitly in the Verify workflow.That surfaced a pre-existing bug.
MRESOURCES-131sets<skip>true</skip>inpluginManagementand asserts the test resource is not copied; it has been failing since 4.0.0-rc-5 — main resources skips,testResourcesdoes not:ResourcesMojoandTestResourcesMojoboth declare a private field namedskip. They collapse into a single descriptor parameter for thetestResourcesgoal, and the configurator writes the superclass field — soTestResourcesMojo's own field staysfalsewhatever the build configured, and its guard never fires. Reading both restores the documented behaviour while keepingmaven.test.skipandmaven.resources.skipworking as before.Renaming the field so the two stop shadowing is not an option: the descriptor generator then sees two parameters called
skipfor one goal and fails withskip has been declared multiple times in mojo with goal: testResources.mvn verify -Prun-itspasses, 24 unit tests, 0 failures. Part of apache/maven#12676. Verified green on a fork before opening.