Pin maven-source-plugin in MJAVADOC-639 IT for Maven 4 compatibility - #1332
Merged
Conversation
The MJAVADOC-639_requires_ignored IT does not pin maven-source-plugin's version. Under Maven 4 the resolver picks the hard-coded default 4.0.0-beta-1 which throws NoSuchMethodError 'ProjectManager.getCompileSourceRoots(...)' against the current API. Maven 4.0.0-rc-5 masks this locally via a "Latest version failed compatibility check -> fall back to RELEASE" path that selects 3.4.0, but the same code on rc-5 in CI (and on master snapshot 4.1.0-SNAPSHOT) executes 4.0.0-beta-1 directly and fails. Pin maven-source-plugin to 3.4.0 in the IT aggregator's pluginManagement, mirroring the maven-shade-plugin pattern. Both submodules inherit the version. The CI-only MJAVADOC-338_downloadSources failure is unrelated (MRM sources-jar log assertion) and tracked separately. Follow-up to apache#1323. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bukama
requested changes
Jun 9, 2026
Per review on apache#1332: reference apache-parent's version.maven-source-plugin property instead of the hardcoded 3.4.0, so future bumps inherit cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ascheman
added a commit
to aschemaven/maven-ear-plugin
that referenced
this pull request
Jun 10, 2026
Add a maven-resources-plugin pin to the test-project aggregator's
pluginManagement, using the existing @-token interpolation pattern
(@mavenResourcesPluginVersion@, sourced from version.maven-resources-plugin
in the outer pom.xml via apache-parent).
Without the pin, Maven 4 rc-5 selects the baked-in default
maven-resources-plugin:4.0.0-beta-1 for the resources goal on
sar-sample-two, which raises a NoSuchMethodError against the current
org.apache.maven.api shape:
NoSuchMethodError 'java.util.List
org.apache.maven.api.services.ProjectManager.getResources(
org.apache.maven.api.Project, org.apache.maven.api.ProjectScope)'
The same masking pattern (locally-cached 3.x version + Maven 4
"compatibility-failed fallback" → silent pass) is what we already
fixed for maven-source-plugin in MJAVADOC-639 (apache/maven-javadoc-plugin#1332).
Empirical evidence: aschemaven/maven-ear-plugin#mvn4-pr499-fail-at-end
CI run 27273896660 reproduced the failure on all 6 rc-5 lanes
(linux/macos/windows x jdk-21/25-zulu). The next CI run after this
commit should show only the skinny-wars-timestamp checksum failure
remaining (which is tracked separately as Failure A in the workspace
plan).
hboutemy
approved these changes
Jun 12, 2026
hboutemy
left a comment
Member
There was a problem hiding this comment.
AFAIK, failing job is varying from run to run, and not related to the PR
I don't know why there is such a large matrix, but this should not force us to wait for this fix
|
@hboutemy Please assign appropriate label to PR according to the type of change. |
This was referenced Jun 13, 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
Follow-up to #1323 (cc @Bukama). PR #1323 enables
maven4-enabled: truein the shared CI workflow and exposes 2 IT failures on every matrix cell. This PR addresses one of them —MJAVADOC-639_requires_ignored.Root cause
The
MJAVADOC-639_requires_ignoredIT POM does not pinmaven-source-plugin's version. Under Maven 4 the resolver picks the hard-coded default4.0.0-beta-1, which throwsNoSuchMethodError 'java.util.List org.apache.maven.api.services.ProjectManager.getCompileSourceRoots(...)'against the currentorg.apache.maven.apishape.Locally Maven
4.0.0-rc-5masks this via a "Latest version of plugin ... failed compatibility check / Looking for compatible RELEASE version" fallback that selects3.4.0. CI (samerc-5binary) andapache/mavenmaster snapshot (4.1.0-SNAPSHOT) both skip the fallback and execute4.0.0-beta-1directly — so the bug surfaces on PR #1323's CI matrix and will hit users on rc-6 / GA.Fix
Pin
maven-source-pluginto3.4.0in the IT aggregator's<pluginManagement>. Mirrors the pattern landed for shade-plugin (MSHADE-105etc., PR #816).Out of scope
MJAVADOC-338_downloadSourcesalso fails on PR #1323's CI (verify.groovy assertion on aDownloading from mrm-maven-plugin: ...-sources.jarlog line that is missing on CI but present locally on both rc-5 and master snapshot). Not reproducible on macOS — needs a Linux-side reproduction of the MRM behaviour before a fix can be drafted. Tracked as a separate follow-up so this PR can land cleanly.Verification
mvn clean verify -P run-its -Dinvoker.test='MJAVADOC-639*'with Maven4.0.0-rc-5on JDK 17.0.18 Temurin / macOS aarch64: 2/2 ITs pass (vs. 1/2 on4.1.0-SNAPSHOTmaster snapshot prior to the fix).cc @Bukama @hboutemy