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-ffa450edef68master
parent
93e82e524e
commit
6cc24a1747
|
|
@ -84,6 +84,11 @@ under the License.
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ under the License.
|
|||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ under the License.
|
|||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-utils</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue