Fix sar-sample-two and skinny-wars-timestamp ITs on Maven 4 rc-5#505
Merged
Conversation
Maven 4 rc-5 picks the default 4.0.0-beta-1 which raises NoSuchMethodError on the failsafe-driven EarMojoIT. Pin via the existing @-token pattern in project-092/-093/ -094/-097 with a new <mavenResourcesPluginVersion> property sourced from apache-parent.
The fixture m2snapshots ships maven-metadata.xml without .sha1/.md5 companions; Maven 4 / Resolver 2.0.13 raises ChecksumFailureException and the snapshot version cannot be resolved. Add <checksumPolicy>ignore</checksumPolicy> to all repo blocks. Matches the established Apache pattern (11 plugins verified). Deeper discussion raised on dev@maven.apache.org.
slachiewicz
approved these changes
Jun 14, 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.
Summary
Two integration tests fail on Maven 4.0.0-rc-5 in PR #499's matrix. This PR
makes them pass with conservative IT-fixture changes only — no production
code touched.
Failure A —
skinny-wars-timestamp(invoker IT)The fixture
src/test/resources/m2snapshots/.../maven-metadata.xmlhas no.sha1/.md5companions. On Maven 4 / Resolver 2.0.13 this tripsChecksumFailureExceptionfor the metadata transfer from the IT'sfile://local.snapshotrepo; the snapshot version then cannot be resolved and thebuild aborts with
Missing file: war-module-one-1.0.war.Fix: add
<checksumPolicy>ignore</checksumPolicy>to all<releases>/<snapshots>blocks insrc/it/settings.xml. This is the long-standingApache-plugin-IT convention for
file://fixtures (the same line is presentin
maven-clean-plugin,maven-compiler-plugin,maven-deploy-plugin,maven-install-plugin,maven-resources-plugin,maven-shade-plugin,maven-site-plugin, and others).This is a workaround at the IT-fixture layer. The underlying Resolver
behavior is tracked at apache/maven-resolver#1920 (labeled
bug, milestone2.0.19), so this PR should become unnecessary once Maven 4 picks up that
Resolver release.
Failure B —
EarMojoIT.sar-sample-two(failsafe Java IT)Maven 4 rc-5 picks the baked-in default
maven-resources-plugin:4.0.0-beta-1for the test-project
default-resourcesgoal, which raisesNoSuchMethodErroragainst the currentorg.apache.maven.apishape. Localcaches with a 3.x version of the plugin silently mask the failure via Maven
4's "compatibility-failed → look for compatible RELEASE" fallback; pristine
CI environments hit it directly.
Fix: pin
maven-resources-pluginvia the existing@-tokenpluginManagementpattern inproject-092/-093/-094/-097, witha new
<mavenResourcesPluginVersion>property sourced fromapache-parent'sversion.maven-resources-plugin. Mirrors what landed formaven-source-pluginin apache/maven-javadoc-plugin#1332.Verification
Validated end-to-end on the fork branch
aschemaven/maven-ear-plugin#mvn4-pr499-fail-at-end, which combinesBukama's #499 (
maven4-enabled: true) with this PR's two fixes andverify-fail-fast: falsefor full matrix visibility:skinny-wars-timestampchain leftThis PR's own CI on
mvn4-rc5-it-fixesonly exercises Maven 3.9.16 becausemaven4-enableddefaults tofalseonmaster. @Bukama — once #499merges, please rebase this PR so the upstream matrix surfaces Maven 4 here
directly.
Related
merging Enable Maven 4 build #499 first, then rebasing here.
the mechanism documented above is the refined understanding).
maven-source-plugin:4.0.0-beta-1.(milestone 2.0.19).
cc @Bukama @cstamas @hboutemy