mirror of https://github.com/apache/maven.git
[MNG-2254] support XML file encoding when writing settings
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@587489 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
453383370c
commit
353cd5bac4
|
@ -80,10 +80,10 @@ import org.codehaus.plexus.configuration.PlexusConfigurationException;
|
||||||
import org.codehaus.plexus.logging.LoggerManager;
|
import org.codehaus.plexus.logging.LoggerManager;
|
||||||
import org.codehaus.plexus.util.IOUtil;
|
import org.codehaus.plexus.util.IOUtil;
|
||||||
import org.codehaus.plexus.util.ReaderFactory;
|
import org.codehaus.plexus.util.ReaderFactory;
|
||||||
|
import org.codehaus.plexus.util.WriterFactory;
|
||||||
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
@ -263,7 +263,7 @@ public class MavenEmbedder
|
||||||
|
|
||||||
SettingsXpp3Writer writer = new SettingsXpp3Writer();
|
SettingsXpp3Writer writer = new SettingsXpp3Writer();
|
||||||
|
|
||||||
Writer fileWriter = new FileWriter( file );
|
Writer fileWriter = WriterFactory.newXmlWriter( file );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@ public final class MavenEmbedderFileLogger
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.log = new PrintWriter( new FileWriter( logFile ) );
|
this.log = new PrintWriter( new FileWriter( logFile ) ); // platform encoding
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue