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>
|
</exclusion>
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
|
<artifactId>plexus-utils</artifactId>
|
||||||
|
<version>3.0.1</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ under the License.
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
<artifactId>plexus-utils</artifactId>
|
<artifactId>plexus-utils</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ under the License.
|
||||||
<groupId>org.codehaus.plexus</groupId>
|
<groupId>org.codehaus.plexus</groupId>
|
||||||
<artifactId>plexus-utils</artifactId>
|
<artifactId>plexus-utils</artifactId>
|
||||||
<version>3.0.1</version>
|
<version>3.0.1</version>
|
||||||
<scope>provided</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ package ${helpPackageName};
|
||||||
|
|
||||||
import org.apache.maven.plugin.AbstractMojo;
|
import org.apache.maven.plugin.AbstractMojo;
|
||||||
import org.apache.maven.plugin.MojoExecutionException;
|
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.Xpp3Dom;
|
||||||
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
|
import org.codehaus.plexus.util.xml.Xpp3DomBuilder;
|
||||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||||
|
|
@ -93,7 +94,7 @@ public class HelpMojo
|
||||||
InputStream is = getClass().getResourceAsStream( pluginHelpPath );
|
InputStream is = getClass().getResourceAsStream( pluginHelpPath );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return Xpp3DomBuilder.build( is, "ISO-8859-1" );
|
return Xpp3DomBuilder.build( ReaderFactory.newXmlReader( is ) );
|
||||||
}
|
}
|
||||||
catch ( XmlPullParserException e )
|
catch ( XmlPullParserException e )
|
||||||
{
|
{
|
||||||
|
|
@ -122,7 +123,6 @@ public class HelpMojo
|
||||||
indentSize = 2;
|
indentSize = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME encoding as parameter
|
|
||||||
Xpp3Dom pluginElement = build();
|
Xpp3Dom pluginElement = build();
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue