ascheman opened a new pull request, #816:
URL: https://github.com/apache/maven-shade-plugin/pull/816
## Summary
Pin plugin versions in six failing integration tests so the suite builds
clean under Maven 4.0.0-rc-5, and enable the shared workflow's `maven4-enabled`
input so CI actually exercises it.
Supersedes #810 (which flips the same CI flag but does not fix the failures
it then exposes).
## Root cause
Under Maven 4.0.0-rc-5, when an IT POM does not pin a plugin version, Maven
4 picks the `4.0.0-beta-1` of `maven-jar-plugin`, `maven-resources-plugin`,
`maven-source-plugin` as the default. Those betas were built against an earlier
Maven 4 rc API which has since changed; they throw `NoSuchMethodError` at
runtime on:
- `Project.getPomArtifact()` (for `maven-jar-plugin:4.0.0-beta-1`)
- `ProjectManager.getResources(...)` (for
`maven-resources-plugin:4.0.0-beta-1`)
- `PluginParameterExpressionEvaluator.<init>(...)` (for
`maven-enforcer-plugin:1.0`, inherited from `oss-parent:7`)
## Changes
- `src/it/projects/MSHADE-105/pom.xml` — add `<pluginManagement>` pinning
resources + jar plugins
- `src/it/projects/MSHADE-284_shadeTestJar/pom.xml` — pin `maven-jar-plugin`
- `src/it/projects/MSHADE-285_createTestSourcesJar/pom.xml` — pin
`maven-source-plugin` (3.3.1) and `maven-jar-plugin`
- `src/it/projects/MSHADE-340_shadedTestJarArtifactAttached/pom.xml` — same
pattern
- `src/it/projects/MSHADE-467_parallel-dependency-reduced-pom/pom.xml` — add
`maven-jar-plugin` to `<pluginManagement>`
- `src/it/projects/mshade-123/pom.xml` — drop
`<parent>org.sonatype.oss:oss-parent:7</parent>` (was pulling in
`maven-enforcer-plugin:1.0`)
- `.github/workflows/maven-verify.yml` — `maven4-enabled: true`
## Test plan
Verified locally with sdkman-installed `Apache Maven 4.0.0-rc-5 (fb3ecaef…)`
on JDK 17.0.18 Temurin / macOS aarch64, isolated `-Dmaven.repo.local`:
```
Build Summary:
Passed: 83, Failed: 0, Errors: 0, Skipped: 1
```
Versus the pre-fix baseline of `Passed: 76, Failed: 7, Errors: 0, Skipped:
1`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]