Skip to content

Supply plexus-utils 4.x and plexus-xml to projects that use plexus-testing - #129

Merged
slachiewicz merged 1 commit into
masterfrom
agent/supply-plexus-xml
Dec 2, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/supply-plexus-xml

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Declares plexus-utils 4.2.0 and plexus-xml 3.1.1, so that a project whose tests start a container through plexus-testing gets a matching pair.

Sisu Plexus reads XmlStreamReader, MXParser and Xpp3Dom at container start and declares only plexus-utils, which contained them up to 3.x. A project that declares plexus-utils 4.x replaces that jar, and its tests then fail with NoClassDefFoundError: org/codehaus/plexus/util/xml/XmlStreamReader unless it also declares plexus-xml, even when its own code never touches XML. With this change those projects no longer need that declaration for their tests. Sisu can stop needing it at the source with eclipse-sisu/sisu-project#285; this is the fix that does not wait for a Sisu release.

What a consumer resolves changes as follows (runtime dependency:list of a project without a parent that depends only on plexus-testing):

-   org.codehaus.plexus:plexus-utils:jar:3.6.2:compile
+   org.codehaus.plexus:plexus-utils:jar:4.2.0:compile
+   org.codehaus.plexus:plexus-xml:jar:3.1.1:compile

A project that pins plexus-utils 3.x itself keeps its version and now also has plexus-xml on its test classpath, so the XML classes are present twice there; plexus-io is such a project and its tests pass.

Verified against a local snapshot, mvn -B test in each:

  • plexus-resources with its own plexus-xml declaration removed → 16 tests pass (they fail with the NoClassDefFoundError against 2.2.0)
  • plexus-io (plexus-utils 3.6.4) → 64 tests pass
  • plexus-i18n and plexus-velocity (no plexus-utils of their own) → 5 and 1 tests pass

The Dependabot ignore keeps plexus-xml on 3.x, as in the other repositories.

Part of codehaus-plexus/.github#94.

…sting

Sisu Plexus reads the XML classes that plexus-utils 3.x contained, so a project on
plexus-utils 4.x failed at container start unless it declared plexus-xml itself.
@slachiewicz slachiewicz added the enhancement New feature or request label Dec 2, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review December 2, 2026 10:21
@slachiewicz
slachiewicz merged commit b8afad4 into master Dec 2, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/supply-plexus-xml branch December 2, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant