ascheman opened a new pull request, #106:
URL: https://github.com/apache/maven-jmod-plugin/pull/106
## Summary
Five of the plugin's 18 integration tests fail under Maven 4.0.0-rc-5.
Two distinct root causes, both **IT-only** — no plugin source change.
| IT | Root cause |
|---|---|
| `mjmod-20-set-main-class` | `maven-jar-plugin:4.0.0-beta-1` (picked when
the IT declares the plugin with an `<execution>` block but no `<version>`)
calls `Project.getPomArtifact()` → `NoSuchMethodError` against rc-5+ APIs |
| `mjmod-23-path-must-be-dir` | same |
| `list-plain` | `verify.groovy` scrapes `build.log` between `[INFO] The
following files are contained in the module file` and the next `[INFO] ---`
divider; Maven 4 inserts `[INFO] Copying … to project local repository` lines
into that block which leak into the asserted Set |
| `list-base-config` | same |
| `describe-base-config` | same pattern, anchored on `[INFO]
<module>@<version>` instead |
(`mjmod-20-set-main-class` and `mjmod-23-path-must-be-dir` *also* have the
Mode-2 log-scrape pattern in their own `verify.groovy` — fixed in this PR
too,
though those would have been masked by the Mode-1 failure on rc-5 alone.)
## Fix
1. **Pin `maven-jar-plugin:3.4.2`** in `<pluginManagement>` of
`src/it/mjmod-20-set-main-class/pom.xml` and
`src/it/mjmod-23-path-must-be-dir/pom.xml`. This is the same family as
the recently merged maven-javadoc-plugin#1332 (MJAVADOC-639) for
`maven-source-plugin:4.0.0-beta-1`.
2. **Tighten the `verify.groovy` `findAll {}`** in the five ITs above to
reject `[INFO] Copying …` (and, where relevant, `[DEBUG] Reading file
model from …`) lines that Maven 4 emits inside what used to be jmod's
exclusive output block.
## Relationship to PR #101
This builds on @Bukama's open #101 (the workflow flip enabling the rc-5
matrix). #101 is necessary — without `maven4-enabled: true`, CI never
exercises Maven 4 — but not sufficient: the underlying IT defects are real
on master and only surface once the rc-5 matrix runs.
Cleanest landing path: this PR lands first; #101 either rebases (its
content survives unchanged) or is closed in favour of a single combined
flip + fix. Happy to coordinate with @Bukama on whichever he prefers.
## Test plan
- [x] `mvn -P run-its clean verify` against **4.0.0-rc-5**:
`Passed: 18, Failed: 0, Errors: 0, Skipped: 0`
- [x] `mvn -P run-its clean verify` against **3.9.9** (regression check):
`Passed: 18, Failed: 0, Errors: 0, Skipped: 0`
- [x] macOS aarch64 / JDK 17 Temurin locally
- [ ] CI matrix on the upstream repo (will appear after this PR opens)
--
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]