Skip to content

Commit

Permalink
Specify UTF-8 when reading build log (#267)
Browse files Browse the repository at this point in the history
* SpecifyUTF-8 when reading build log
  • Loading branch information
elharo authored Dec 7, 2024
1 parent 6fe729b commit 39d6844
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
package org.apache.maven.plugins.invoker;

import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.Reader;
import java.nio.file.Files;
import java.util.ArrayList;
import java.util.List;

Expand Down Expand Up @@ -210,7 +211,7 @@ public void logFailedBuildLog(Log logger, boolean ignoreFailures) throws MojoFai
buildLogMessage.append(System.lineSeparator());
buildLogMessage.append("*** begin build.log for: " + buildJob.getProject() + " ***");
buildLogMessage.append(System.lineSeparator());
try (FileReader buildLogReader = new FileReader(buildLogFile)) {
try (Reader buildLogReader = Files.newBufferedReader(buildLogFile.toPath())) {
buildLogMessage.append(IOUtil.toString(buildLogReader));
}
buildLogMessage.append("*** end build.log for: " + buildJob.getProject() + " ***");
Expand Down

0 comments on commit 39d6844

Please sign in to comment.