use fixed encoding instead of platform encoding

git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@702255 13f79535-47bb-0310-9956-ffa450edef68
master
Herve Boutemy 2008-10-06 20:49:29 +00:00
parent ab8736ed17
commit bb97cde734
1 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,7 @@ import org.apache.maven.tools.plugin.extractor.ExtractionException;
import java.io.File;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@ -115,12 +116,17 @@ public class BeanshellMojoDescriptorExtractor
interpreter.set( "mojoDescriptor", mojoDescriptor );
interpreter.eval( new InputStreamReader( getClass().getResourceAsStream( "/extractor.bsh" ) ) );
interpreter.eval( new InputStreamReader( getClass().getResourceAsStream( "/extractor.bsh" ), "UTF-8" ) );
}
catch ( EvalError evalError )
{
throw new InvalidPluginDescriptorException( "Error scanning beanshell script", evalError );
}
catch ( UnsupportedEncodingException uee )
{
// should not occur...
throw new InvalidPluginDescriptorException( "Unsupported encoding while reading beanshell script", uee );
}
return mojoDescriptor;
}