Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump plexus-utils from 3.3.1 to 3.4.1 #551

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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