Skip to content

Commit

Permalink
Bump plexus-utils from 3.3.1 to 3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Apr 23, 2022
1 parent a6a2d75 commit 7a5df14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Expand Up @@ -213,8 +213,7 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<!-- Stick with version 3.3.1 because later versions break writing of output files, see https://github.com/mojohaus/versions-maven-plugin/issues/542 -->
<version>3.3.1</version>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
Expand Down
Expand Up @@ -21,12 +21,13 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.StandardOpenOption;
import java.util.LinkedHashSet;
import java.util.Set;

import org.apache.commons.lang3.StringUtils;
import org.apache.maven.plugins.annotations.Parameter;
import org.codehaus.plexus.util.FileUtils;

/**
* Abstract base class for the Display___ mojos.
Expand All @@ -36,6 +37,7 @@
public abstract class AbstractVersionsDisplayMojo
extends AbstractVersionsUpdaterMojo
{
String NL = System.getProperty( "line.separator" );

private static final int DEFAULT_OUTPUT_LINE_WIDTH = 80;

Expand Down Expand Up @@ -149,9 +151,9 @@ protected void logLine( boolean error, String line )
{
try
{
FileUtils.fileAppend( outputFile.getAbsolutePath(), outputEncoding,
error ? "> " + line + System.getProperty( "line.separator" )
: line + System.getProperty( "line.separator" ) );
Files.write( outputFile.toPath(),
( error ? "> " + line + NL : line + NL ).getBytes( outputEncoding ),
StandardOpenOption.APPEND, StandardOpenOption.CREATE );
}
catch ( IOException e )
{
Expand Down

0 comments on commit 7a5df14

Please sign in to comment.