slachiewicz opened a new issue, #12754:
URL: https://github.com/apache/maven/issues/12754

   ### New feature, improvement proposal
   
   `org.apache.maven.internal.xml.XmlNodeBuilder` is deprecated, and it is the 
reason `impl/maven-xml` declares
   `org.codehaus.plexus:plexus-xml` at `provided` scope with a wildcard 
exclusion carrying the comment *"we need the
   exclusion to be able to release, else we have a cycle"*. The cycle is real 
in both directions: `XmlNodeBuilder`
   parses with plexus-xml's `MXParser`, while plexus-xml builds against 
maven-xml.
   
   plexus-xml has now removed its half — codehaus-plexus/plexus-xml#94 ports 
the pull loop into that artifact, so
   `Xpp3DomBuilder` no longer calls into `org.apache.maven.internal.xml`. Once 
it is released as 4.2.0, both remaining
   call sites here have public replacements. In 
`compat/maven-embedder/src/main/java/org/eclipse/sisu/plexus/PlexusXmlBeanConverter.java`:
   
   ```java
   // XmlNode target
   return Xpp3DomBuilder.build(parser).getDom();   // was 
XmlNodeBuilder.build(parser)
   // Xpp3Dom target
   return Xpp3DomBuilder.build(parser);            // was new 
Xpp3Dom(XmlNodeBuilder.build(parser))
   ```
   
   Both paths default to `trim == true` on either side, so this is a delegation 
change rather than a parsing change.
   `XmlService` is not an option for these two: it reads through StAX and 
exposes no `XmlPullParser` overload, which is
   precisely why plexus-xml kept a pull-based builder rather than migrating.
   
   `XmlNodeBuilder` is the only file under `impl/maven-xml/src/main/java` that 
imports `org.codehaus.plexus.util.xml`,
   so deleting it also retires the `provided` dependency and its exclusion 
block. `XmlPlexusConfiguration` imports
   `org.codehaus.plexus.configuration.PlexusConfiguration`, which comes from 
sisu-plexus, not from plexus-xml.
   
   Prerequisite: `plexusXmlVersion` is 4.1.1 today and would need to move to 
4.2.0.
   
   Scoped to `master`. `maven-4.0.x` carries the same code, but removing an 
internal class on a maintenance line is a
   separate call — the call-site change alone would apply there if wanted.
   
   *This issue was created with AI assistance.*


-- 
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]

Reply via email to