ascheman commented on PR #11251:
URL: https://github.com/apache/maven/pull/11251#issuecomment-5345367715
### Why (context for the `backport-to-4.0.x` label I just added)
Since the core IT suite moved into the repository, each line carries its own
copy — but the two
4.x lines now carry *different* harnesses:
| | `master` | `maven-4.0.x` |
|---|---|---|
| version-range constructor | removed (#11251) | mandatory; 570 of 742 IT
classes declare one |
| test ordering | JUnit `ClassOrderer` | `TestSuiteOrdering` registry, 714
entries |
| `extractResources` | returns `Path` | returns `File` |
Fixes are developed on `master` and cherry-picked to `maven-4.0.x`, so every
backported IT has to
be hand-adapted. That is small but recurring work, and it has a quiet
failure mode: a
version-range constructor that does not match makes the backported test
**skip** instead of run,
which looks green.
The registry has the same problem in the other direction — 28 IT classes on
`maven-4.0.x`
currently warn `is not present in TestSuiteOrdering`, so it is already
drifting.
### What
Cherry-pick this PR's commit (`be9541cb9d`) onto `maven-4.0.x`.
Measured by actually running the cherry-pick:
```
711 of 719 files apply cleanly (+398 / −3230)
8 conflicts 7 IT classes that drifted since 2025-10 +
TestSuiteOrdering.java
29 IT classes still declare super("…") (added to 4.0.x after the refactor)
```
Test-only: no production code is touched. Validation is one full `-Prun-its`
run.
### What *not* to backport
The later `File` → `Path` migration of `extractResources`/`newVerifier`
should stay on `master`.
It touches ~684 more IT classes and buys nothing for portability: a test
written as
```java
var testDir = extractResources("/gh-1234-something");
Verifier verifier = newVerifier(testDir.toString());
```
compiles on both harnesses already — both return an absolute path, both
accept the leading `/`,
and `newVerifier(String)` exists on both (deprecated on master). With #11251
backported, the
constructor is the last hard difference, and it disappears.
### Concrete motivation
The fix in #12771 needed exactly this: the cherry-pick to `maven-4.0.x`
compiled the
production change fine and failed on the test with `no suitable constructor
found for
AbstractMavenIntegrationTestCase(no arguments)`, so the backport carries a
separate five-line
"adapt the IT to the maven-4.0.x test harness" commit. With #11251 on the
branch, that commit
would not exist.
--
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]