Skip to content

Declare javax.inject where it is used and drop two redundant plexus-utils declarations - #659

Merged
slachiewicz merged 2 commits into
masterfrom
agent/prune-plexus-utils-declarations
Dec 2, 2026
Merged

slachiewicz merged 2 commits into
masterfrom
agent/prune-plexus-utils-declarations

Conversation

@slachiewicz

Copy link
Copy Markdown
Member

Removes the plexus-utils declaration from modello-plugin-jsonschema and modello-plugin-snakeyaml, where no code references it and modello-core supplies it, and declares javax.inject in the 15 modules whose main code imports it but received it only through modello-core (provided in modello-maven-plugin, like its other Maven-supplied dependencies).

modello-test keeps its plexus-utils declaration and gains a comment. Nothing in that module references it either, but it does not depend on modello-core, so without the declaration a consumer resolves the plexus-utils 3.6.2 of Sisu Plexus, whose XML classes duplicate those of plexus-xml. The seven other plugin modules keep theirs because their src/test/verifiers sources use FileUtils and IOUtil.

Consumers see no change: the runtime dependency:list of a project without a parent is identical before and after for modello-plugin-xpp3, modello-plugin-jackson and modello-maven-plugin, and modello-test, modello-plugin-snakeyaml and modello-plugin-jsonschema still resolve plexus-utils 4.2.0 and plexus-xml 3.1.1.

Verified: mvn -B verify on JDK 17 → BUILD SUCCESS, 180 tests. I have not run the run-its profile locally.

Part of codehaus-plexus/.github#94.

modello-core supplies plexus-utils to the JSON Schema and SnakeYAML plugins, and no code
in them references it. modello-test keeps its declaration, which sets the version consumers get.
Main code in these modules imports javax.inject directly. It was only arriving through modello-core.
@slachiewicz slachiewicz added the maintenance Cleanup, refactoring or other internal change label Dec 2, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review December 2, 2026 10:24
@slachiewicz
slachiewicz merged commit 93360d8 into master Dec 2, 2026
13 checks passed
@slachiewicz
slachiewicz deleted the agent/prune-plexus-utils-declarations branch December 2, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Cleanup, refactoring or other internal change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant