GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Build the DOM with a local pull builder instead of Maven's deprecated XmlNodeBuilder by slachiewicz · Pull Request #94 · codehaus-plexus/plexus-xml

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Aug 16, 2026

Copy link
Copy Markdown
Member

org.apache.maven.internal.xml.XmlNodeBuilder is @Deprecated in maven-xml 4.0.0-rc-6 and was the last
org.apache.maven.internal.* reference left in src/main. It also parses with this artifact's own MXParser,
so maven-xml declares a provided-scope dependency back on plexus-xml while plexus-xml depends on maven-xml at
compile scope. Porting the loop here breaks that cycle and clears the way for Maven to delete the class.

XmlService cannot cover these call paths — it parses through StAX, so there is no XmlPullParser overload for
Xpp3DomBuilder.build(XmlPullParser, …) (Modello-generated xpp3 readers call it), its InputLocationBuilder
takes an XMLStreamReader where the public plexus one takes an XmlPullParser, and it always trims, leaving
build(reader, false) unserved. StAX also populates prefix/namespaceUri and xmlns:* attributes that the pull
path does not, and trims the concatenated value once where the pull path trims each text chunk. Switching to it
is a behavior change, not a refactor; Xpp3Dom keeps using XmlService for merge and the combination-mode
constants as before.

No signature or behavior change: XmlNodePullBuilder is a literal port, with new XmlNodeImpl(…) replaced by
XmlNode.newInstance(…). Both are XmlNode, and XmlNode equality is interface-based, so nodes remain equal
across the two implementations.

The pom still needs maven-xml at runtime — XmlService resolves its implementation through ServiceLoader, and
XmlNode.toString() goes through XmlService.write. Splitting it into a maven-api-xml compile dependency plus a
maven-xml runtime one is a separate question.

Verified: mvn verify → 217 tests, 0 failures.

Closes #73

This change was created with AI assistance.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@slachiewicz
Build the DOM with a local pull builder, not Maven's XmlNodeBuilder
4fef358
org.apache.maven.internal.xml.XmlNodeBuilder is @deprecated in maven-xml
4.0.0-rc-6, and it parses with this artifact's own MXParser — maven-xml
carries a provided-scope dependency back on plexus-xml just to reach it,
against plexus-xml's compile dependency on maven-xml. Porting the loop
here breaks that cycle and lets Maven drop the class.

XmlService is not a substitute for these call paths: it parses through
StAX, so it offers no XmlPullParser overload for
Xpp3DomBuilder.build(XmlPullParser, ...), its InputLocationBuilder takes
an XMLStreamReader rather than an XmlPullParser, and it always trims.
Do not fold XmlNodePullBuilder into XmlService.read without accepting
those as breaking changes.

Nodes now come from XmlNode.newInstance rather than XmlNodeImpl; both
are XmlNode, and XmlNode equality is interface-based.

Closes #73
@slachiewicz slachiewicz added the enhancement New feature or request label Aug 16, 2026
@slachiewicz slachiewicz mentioned this pull request Aug 16, 2026
Drop the deprecated XmlNodeBuilder from Xpp3DomBuilder #73
Closed
@slachiewicz
slachiewicz marked this pull request as ready for review August 16, 2026 20:36
@slachiewicz
slachiewicz merged commit d0f198b into master Aug 16, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Aug 17, 2026
Delete the deprecated XmlNodeBuilder and maven-xml's dependency on plexus-xml apache/maven#12754
Closed
Depend on maven-api-xml at compile and maven-xml at runtime #96
Merged
Set the next development version to 4.2.0-SNAPSHOT #97
Merged
@slachiewicz
slachiewicz deleted the xmlnodebuilder-inline branch August 17, 2026 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

enhancement New feature or request

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Drop the deprecated XmlNodeBuilder from Xpp3DomBuilder

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@slachiewicz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.