diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java index 6cf1ab320e..0b16fa2014 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java @@ -80,10 +80,10 @@ import org.codehaus.plexus.configuration.PlexusConfigurationException; import org.codehaus.plexus.logging.LoggerManager; import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.ReaderFactory; +import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.File; -import java.io.FileWriter; import java.io.IOException; import java.io.Reader; import java.io.Writer; @@ -263,7 +263,7 @@ public class MavenEmbedder SettingsXpp3Writer writer = new SettingsXpp3Writer(); - Writer fileWriter = new FileWriter( file ); + Writer fileWriter = WriterFactory.newXmlWriter( file ); try { diff --git a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderFileLogger.java b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderFileLogger.java index 933cede70a..057e2e3c19 100644 --- a/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderFileLogger.java +++ b/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedderFileLogger.java @@ -37,7 +37,7 @@ public final class MavenEmbedderFileLogger { try { - this.log = new PrintWriter( new FileWriter( logFile ) ); + this.log = new PrintWriter( new FileWriter( logFile ) ); // platform encoding } catch ( IOException e ) {