ascheman opened a new pull request, #13075:
URL: https://github.com/apache/maven/pull/13075
## Summary
Forward port of 349395c0c9, merged into `maven-4.0.x` via #13069.
Closes #13068.
`resolveCoreExtensionAndFlatten` and `resolvePluginAndFlatten` were added to
the internal `PluginDependenciesResolver` as **abstract** methods. That
happened on both lines — #12329 here, #12335 on `maven-4.0.x` — but the fix so
far landed only on `maven-4.0.x`, so 4.1.0 would reintroduce the identical
regression.
Implementations that live out of tree are compiled against one Maven and run
on another, so the first plugin resolution dies with `AbstractMethodError`.
IntelliJ IDEA, Eclipse m2e and NetBeans all override this component; IntelliJ
implements the interface directly and therefore breaks. Christofer Dutz
confirmed on Apache PLC4X that a build carrying this change imports cleanly
where stock rc-6 fails.
## What differs from the maven-4.0.x commit
The production change and the unit test are **byte-identical**. Only the IT
needed adjusting, because master has moved on in three ways:
* **No `TestSuiteOrdering` entry.** That class now orders by name pattern
(`MavenITgh<number>`) instead of keeping an explicit list, so `MavenITgh13068…`
is picked up automatically. The file is untouched here.
* **IT harness.** `AbstractMavenIntegrationTestCase` no longer takes a
version range, `extractResources` returns `Path`, and `newVerifier(String)` is
deprecated in favour of `newVerifier(Path)`. The IT was rewritten to the
current idiom.
* **ITs run under failsafe here**, not surefire.
## Verification
Run locally against this branch:
```
mvn verify -Papache-release -Dgpg.skip=true BUILD SUCCESS (0 javadoc
findings)
unit PluginDependenciesResolverDefaultMethodsTest Tests run: 3, Failures:
0, Errors: 0, Skipped: 0
IT MavenITgh13068LegacyPluginDependenciesResolverTest
failsafe:integration-test @ core-it-suite
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[gh-13068] legacy PluginDependenciesResolver installed
[gh-13068] resolvePlugin reached for maven-clean-plugin
```
The two marker lines are asserted by the test, so it cannot pass without the
extension actually displacing the default component. On `maven-4.0.x` the same
IT was verified red without the change, failing with `AbstractMethodError` at
`DefaultMavenPluginManager.createPluginRealm`.
## Note
The `resolveCoreExtensionAndFlatten` default is best effort — a dedicated
implementation additionally reads the extension's artifact descriptor to apply
relocations and run `MavenPluginDependenciesValidator`. Same caveat as on the
4.0.x PR, where @gnodet approved it as is.
--
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]