Affected version
4.0.0-rc-4
Bug description
While working on moving the maven-help-plugin to Maven 4 I noticed we no longer use the MavenStaxWriter directly. This is now done through the DefaultModelXmlFactory.
The DefaultModelXmlFactory however does not provide a way to define addLocationInformation on the MavenStaxWriter. The XmlWriterRequest defines a way to set the InputLocationFormatter which is related to the addLocationInformation. The formatter is (currently) only used when locationtracking is requested.
My suggestion would be:
- Set
addLocationInformation to false by default in DefaultModelXmlFactory.
- If the
XmlWriterRequest specifies an InputLocationFormatter, set addLocationInformation to true and apply the formatter.
Affected version
4.0.0-rc-4
Bug description
While working on moving the
maven-help-pluginto Maven 4 I noticed we no longer use theMavenStaxWriterdirectly. This is now done through theDefaultModelXmlFactory.The
DefaultModelXmlFactoryhowever does not provide a way to defineaddLocationInformationon theMavenStaxWriter. TheXmlWriterRequestdefines a way to set theInputLocationFormatterwhich is related to theaddLocationInformation. The formatter is (currently) only used when locationtracking is requested.My suggestion would be:
addLocationInformationtofalseby default inDefaultModelXmlFactory.XmlWriterRequestspecifies anInputLocationFormatter, setaddLocationInformationtotrueand apply the formatter.