slachiewicz opened a new pull request, #911:
URL: https://github.com/apache/maven-wagon/pull/911
Groundwork for moving Wagon off Plexus and onto JSR-330. This PR only swaps
the
container; the `@plexus.component` javadoc tags are untouched and would
follow in
a second PR.
`plexus-container-default` is the original Plexus container and cannot read
`META-INF/sisu` indexes, so nothing can become `@Named` while it is in place.
`org.eclipse.sisu.plexus` supplies `PlexusContainer` and `PlexusTestCase`
and reads
both component descriptors and annotated beans, so it is the natural
replacement.
It reads `META-INF/plexus/components.xml` with classpath scanning off, which
is why
this PR stands alone: every existing descriptor keeps working untouched.
### Why now
`maven-parent` 49 bans `plexus-container-default` in its
`drop-legacy-dependencies`
profile. That profile has no activation today, so `master` still builds for
CI --
this is preparation for the ban becoming unconditional, not a fix for a
broken build.
### The swap was not a drop-in
Three behavioural differences between the shim and the original container
turned up
only by building the whole reactor, and each has its own commit:
1. **Nested XML configuration cannot be injected.**
`WagonTestCaseConfigurator` took
its per-use-case configuration as a `<useCaseConfigs>` tree inside the
descriptor.
Asking for a `PlexusConfiguration` fails to convert; asking for a
`String` yields
only the element's text content, which is empty. The configuration now
lives in its
own classpath resource, with the descriptor holding a plain string path.
The
configuration itself is unchanged. **This changes how TCK consumers
configure use
cases**, which is the one deliberate compatibility break here -- all
three in-tree
consumers are updated.
2. **No default `ComponentConfigurator` is registered.**
`lookup(ComponentConfigurator.ROLE)`
fails; `BasicComponentConfigurator` ships in the Sisu jar and is now
instantiated
directly.
3. **`maven-scm-manager-plexus` drags in `plexus-container-default`
1.0-alpha-9**, putting
a second `PlexusContainer`/`PlexusTestCase` on the wagon-scm test
classpath. The
alpha-9 copy won and its `tearDown` is not null-guarded, so every test
failed with an
NPE that hid the real cause. Now excluded.
`WagonTestCase.customizeContext()` is deleted rather than adapted: the
no-argument
signature never overrode `PlexusTestCase.customizeContext(Context)` in
either container,
so it has never been called and the value it set is read nowhere.
### Draft: one known failure
`wagon-scm` is still red. Sisu injects an **immutable** `Map` for Plexus
requirement-maps,
so `AbstractScmManager.setScmProvider` throws
`UnsupportedOperationException` at
`AbstractScmWagonTest.setUp:70` (28 tests). That needs the test to register
`UserSafeGitExeScmProvider` some other way, and I would rather agree the
approach before
writing it.
Everything else passes: 11 of 17 modules green, including the full HTTP TCK
(40 tests, plus the 2 correctly skipped as unsupported).
--
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]