Skip to content

Use conventional verb method names in XmlNode - #11583

Draft
elharo wants to merge 22 commits into
masterfrom
11582
Draft

Use conventional verb method names in XmlNode#11583
elharo wants to merge 22 commits into
masterfrom
11582

Conversation

@elharo

@elharo elharo commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

fixes #11582

@slachiewicz

Copy link
Copy Markdown
Member

@elharo we are close to cut maven 4, what is plan for this change?

@elharo elharo changed the title 11582 Use verb method names in XmlNode Aug 31, 2026
@elharo elharo changed the title Use verb method names in XmlNode Use conventional verb method names in XmlNode Aug 31, 2026
@elharo

elharo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Let me see what I can do about this. It's a mess because of a Modello.

@elharo

elharo commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

ATM I'm stymied by a weird case where org.codehaus.plexus.util.xml.Xpp3Dom depends on XmlNode. That dependency seems to be running the wrong direction. Nothing in plexus should depend on Maven.

@slachiewicz

Copy link
Copy Markdown
Member

@elharo In Maven 4, the relationship between Plexus and Maven XML was inverted by design:

  • org.apache.maven.api.xml.XmlNode is the immutable core API in Maven 4.
  • plexus-xml 4.x was created specifically as a backward-compatibility bridge for legacy plugins—org.codehaus.plexus.util.xml.Xpp3Dom in plexus-xml 4.x wraps and delegates to XmlNode.

Because plexus-xml is an external dependency (codehaus-plexus/plexus-xml), modifying or removing existing method names on XmlNode breaks compatibility with the released plexus-xml 4.x artifacts.

Given that we are close to cutting the Maven 4 release:

  1. We should avoid breaking changes to XmlNode at this stage (or only add getter aliases as default methods rather than renaming existing ones).
  2. Otherwise, this would require coordinating a release of plexus-xml before we can integrate changes here.

What do you think about either adding default getter methods alongside the current methods or deferring this cleanup post-4.0?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Noun method names in XmlNode

3 participants