From 6cc24a1747f130a53c64134ee8ef65c2a2fc9ba4 Mon Sep 17 00:00:00 2001 From: Herve Boutemy Date: Sat, 26 May 2012 20:56:04 +0000 Subject: [PATCH] read plugin-help.xml with encoding detection git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1342963 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/it/annotation-with-inheritance-from-deps/pom.xml | 5 +++++ maven-plugin-plugin/src/it/help-basic/pom.xml | 1 - maven-plugin-plugin/src/it/help-package/pom.xml | 1 - .../src/main/resources/help-class-source.vm | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml index dd28ea8..cabfbef 100644 --- a/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml +++ b/maven-plugin-plugin/src/it/annotation-with-inheritance-from-deps/pom.xml @@ -84,6 +84,11 @@ under the License. + + org.codehaus.plexus + plexus-utils + 3.0.1 + diff --git a/maven-plugin-plugin/src/it/help-basic/pom.xml b/maven-plugin-plugin/src/it/help-basic/pom.xml index bee4f12..a1528ab 100644 --- a/maven-plugin-plugin/src/it/help-basic/pom.xml +++ b/maven-plugin-plugin/src/it/help-basic/pom.xml @@ -45,7 +45,6 @@ under the License. org.codehaus.plexus plexus-utils 3.0.1 - provided diff --git a/maven-plugin-plugin/src/it/help-package/pom.xml b/maven-plugin-plugin/src/it/help-package/pom.xml index 18579f2..42949e8 100644 --- a/maven-plugin-plugin/src/it/help-package/pom.xml +++ b/maven-plugin-plugin/src/it/help-package/pom.xml @@ -45,7 +45,6 @@ under the License. org.codehaus.plexus plexus-utils 3.0.1 - provided diff --git a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm index 1e76d20..22124de 100644 --- a/maven-plugin-tools-generators/src/main/resources/help-class-source.vm +++ b/maven-plugin-tools-generators/src/main/resources/help-class-source.vm @@ -4,6 +4,7 @@ package ${helpPackageName}; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; +import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.xml.Xpp3Dom; import org.codehaus.plexus.util.xml.Xpp3DomBuilder; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; @@ -93,7 +94,7 @@ public class HelpMojo InputStream is = getClass().getResourceAsStream( pluginHelpPath ); try { - return Xpp3DomBuilder.build( is, "ISO-8859-1" ); + return Xpp3DomBuilder.build( ReaderFactory.newXmlReader( is ) ); } catch ( XmlPullParserException e ) { @@ -122,7 +123,6 @@ public class HelpMojo indentSize = 2; } - // FIXME encoding as parameter Xpp3Dom pluginElement = build(); StringBuilder sb = new StringBuilder();