Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

XML encoding: pom.xml, site.xml, ... 

Until now (Maven 2.0.7), XML encoding support is buggy:

  • XML streams are read with platform encoding, which leads to problems with non-ascii characters on ascii based platforms, and every characters on non-ascii platforms (Z/OS with EBCDIC),
  • XML streams are transformed to String (with platform encoding), and the resulting String is reworked a lot before being parsed by an XML parser (interpolation...)
  • even if XML streams were directly passed to the XML parser, MXParser used by Maven does not support encoding itself...

Changing the parser, then the interpolation code is a big task. 

Solution: use XmlReader class from Rome to detect XML streams encoding as defined in XML specification

It won't change much things in the code: only the Reader instanciation. Every other code (particularly interpolation) can remain the same.

Jira issues:

  • [PLXUTILS-11]: add XmlReader to plexus-utils, done in plexus-utils 1.4.3-SNAPSHOT
  • [MNG-2254]: use XmlReader to read pom.xml
  • [MSITE-239]: use XmlReader to read site.xml
  • [PLX-343]: use XmlReader in plexus-container-default to load internal XML configuration files (mainly useful for non-ascii platforms since there are no special characters in configuration files)
  • [MANTTASKS-14]: make Maven Ant Tasks work on Z/OS
  • [DOXIA-133]: XML encoding detection for xdoc, docbook, fml and xhtml files
  • TODO : use XmlReader class wherever an XML stream has to be changed into a String/Reader
  • TODO: integrate it to Modello
  • No labels