You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stefan H?bner (JIRA)" <ji...@codehaus.org> on 2006/05/10 00:04:41 UTC

[jira] Commented: (MNG-2255) Use a external XML Pull parser instead of plexus one

    [ http://jira.codehaus.org/browse/MNG-2255?page=comments#action_65075 ] 

Stefan Hübner commented on MNG-2255:
------------------------------------

Hm, just a thought, but:

To me it seems that the parser used to read in maven's model isn't the problem really. It's more likely the way the POM is handed to the parser.

Have a look to class org.apache.maven.model.io.xpp3.MavenXpp3Reader which is generated by maven-model. This MavenXpp3Reader is invoked via read-method with one parameter. This parameter is a Reader and that, to me, is problematic. Problematic because there's no way once you have a Reader on some inputsource (i.e. a stream) to change that reader's handling of character encodings on it's underlying stream. So, as long as reading the model is invoked by handing a Reader to some parser the parser won't be able to adapt to the actual POM's encoding.

As a conclusion I would recommend model parser should be handed a stream rather than a Reader-instance working on the underlying POM.

I don't know if other parsers can cope with that situation, but XMLPullParser doesn't. It would though, if it is given a stream on the POM, but I don't know which wider implications this would cause.

What do you think?

> Use a external XML Pull parser instead of plexus one
> ----------------------------------------------------
>
>          Key: MNG-2255
>          URL: http://jira.codehaus.org/browse/MNG-2255
>      Project: Maven 2
>         Type: Improvement

>   Components: POM
>     Versions: 2.0.4
>     Reporter: Carlos Sanchez
>     Priority: Critical
>      Fix For: 2.0.5

>
>
> To avoid maintaining the plexus XMLPullParser we should move to a standard implementation like StaX
> As mentioned in DOXIA-60:
> There's a performance white paper
> http://java.sun.com/performance/reference/whitepapers/StAX-1_0.pdf
> The best implementation seems to be http://woodstox.codehaus.org/
> Another nice set of utilities at http://wiki.java.net/bin/view/Javawsxml/StaxUtilsProject
> The indentator could be used instead of the PrettyPrintXMLWriter

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira