Fix effective-pom_properties IT for Maven 4 compatibility#371
Open
ascheman wants to merge 1 commit into
Open
Conversation
The effective-pom_properties IT's verify.groovy was updated in PR apache#344 (merged 2025-10-31) to assert that user properties override pom properties on Maven 4, expecting maven.compiler.source/target=8 in the rendered effective POM. However the change updated only verify.groovy. The corresponding invoker.properties was never extended to actually pass the user properties into the invoked Maven build, so the assertion fired unconditionally on Maven 4 (the rendered effective POM legitimately showed the pom-property values 1.6/1.6). Add invoker.systemProperties.maven.compiler.source/target=8 so the IT exercises the assertion path it was rewritten for. No production code change; only the IT fixture. This unblocks PR apache#363 (enable Maven 4 CI matrix). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
The
effective-pom_propertiesintegration test is the single IT failing under Maven 4.0.0-rc-5 on master, which leaves PR #363 ("enable build with Maven 4") with a red CI matrix. This PR fixes the IT fixture so the rc-5 matrix turns green.Root cause
verify.groovywas updated in #344 (merged 2025-10-31) to branch onmavenVersion.startsWith('4.')and assert thatmaven.compiler.source/target = 8appear in the rendered effective POM — testing that user properties override pom properties on Maven 4.The change updated only
verify.groovy. The companioninvoker.propertieswas never extended to actually pass-Dmaven.compiler.source=8 -Dmaven.compiler.target=8(or theinvoker.systemProperties.*form) into the invoked Maven build. So under Maven 4 the invocation didn't define those user properties at all, the rendered effective POM legitimately showed the pom-property values (1.6/1.6), and the new Maven-4 assertion fired unconditionally.The bug is entirely in the IT fixture; the production
MavenHelpPluginis unaffected.Fix
Three lines added to
src/it/projects/effective-pom_properties/invoker.properties:Verification
mvn -P run-its -Dinvoker.test='effective-pom_properties' verifyagainst Maven4.0.0-rc-5(sdkman, JDK 17.0.18 Temurin / macOS aarch64): Passed: 1, Failed: 0, Errors: 0, Skipped: 0.Context
maven4-enabled: true).