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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MPMD-353] - API incompatibility with jansi after upgrading m-shared-… #91

Merged
merged 1 commit into from
Sep 1, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/java/org/apache/maven/plugins/pmd/CpdReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.apache.maven.plugins.pmd.exec.CpdRequest;
import org.apache.maven.plugins.pmd.exec.CpdResult;
import org.apache.maven.reporting.MavenReportException;
import org.apache.maven.shared.utils.logging.MessageUtils;
import org.apache.maven.toolchain.Toolchain;

import net.sourceforge.pmd.cpd.JavaTokenizer;
Expand Down Expand Up @@ -211,7 +210,6 @@ private void executeCpd()
request.addFiles( filesToProcess.keySet() );

request.setShowPmdLog( showPmdLog );
request.setColorizedLog( MessageUtils.isColorEnabled() );
request.setLogLevel( determineCurrentRootLogLevel() );

request.setExcludeFromFailureFile( excludeFromFailureFile );
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.apache.maven.shared.artifact.filter.resolve.TransformableFilter;
import org.apache.maven.shared.transfer.artifact.resolve.ArtifactResult;
import org.apache.maven.shared.transfer.dependencies.resolve.DependencyResolver;
import org.apache.maven.shared.utils.logging.MessageUtils;
import org.apache.maven.toolchain.Toolchain;
import org.codehaus.plexus.resource.ResourceManager;
import org.codehaus.plexus.resource.loader.FileResourceCreationException;
Expand Down Expand Up @@ -374,7 +373,6 @@ private void executePmd()
request.setOutputEncoding( getOutputEncoding() );
request.setFormat( format );
request.setShowPmdLog( showPmdLog );
request.setColorizedLog( MessageUtils.isColorEnabled() );
request.setSkipPmdError( skipPmdError );
request.setIncludeXmlInSite( includeXmlInSite );
request.setReportOutputDirectory( getReportOutputDirectory().getAbsolutePath() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public CpdExecutor( CpdRequest request )

private CpdResult run() throws MavenReportException
{
setupPmdLogging( request.isShowPmdLog(), request.isColorizedLog(), request.getLogLevel() );
setupPmdLogging( request.isShowPmdLog(), request.getLogLevel() );

try
{
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/org/apache/maven/plugins/pmd/exec/CpdRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public class CpdRequest implements Serializable
private List<File> files = new ArrayList<>();

private boolean showPmdLog;
private boolean colorizedLog;
private String logLevel;

private String excludeFromFailureFile;
Expand Down Expand Up @@ -122,11 +121,6 @@ public void setShowPmdLog( boolean showPmdLog )
this.showPmdLog = showPmdLog;
}

public void setColorizedLog( boolean colorizedLog )
{
this.colorizedLog = colorizedLog;
}

public void setLogLevel( String logLevel )
{
this.logLevel = logLevel;
Expand Down Expand Up @@ -197,11 +191,6 @@ public boolean isShowPmdLog()
return showPmdLog;
}

public boolean isColorizedLog()
{
return colorizedLog;
}

public String getLogLevel()
{
return logLevel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

import org.apache.maven.cli.logging.Slf4jConfiguration;
import org.apache.maven.cli.logging.Slf4jConfigurationFactory;
import org.apache.maven.shared.utils.logging.MessageUtils;
import org.codehaus.plexus.logging.console.ConsoleLogger;
import org.slf4j.ILoggerFactory;
import org.slf4j.Logger;
Expand All @@ -54,10 +53,8 @@ abstract class Executor
*/
private java.util.logging.Logger julLogger;

protected void setupPmdLogging( boolean showPmdLog, boolean colorizedLog, String logLevel )
protected void setupPmdLogging( boolean showPmdLog, String logLevel )
{
MessageUtils.setColorEnabled( colorizedLog );

if ( !showPmdLog )
{
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public PmdExecutor( PmdRequest request )

private PmdResult run() throws MavenReportException
{
setupPmdLogging( request.isShowPmdLog(), request.isColorizedLog(), request.getLogLevel() );
setupPmdLogging( request.isShowPmdLog(), request.getLogLevel() );

PMDConfiguration configuration = new PMDConfiguration();
LanguageVersion languageVersion = null;
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/org/apache/maven/plugins/pmd/exec/PmdRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public class PmdRequest implements Serializable
private List<File> files = new ArrayList<>();

private boolean showPmdLog;
private boolean colorizedLog;
private String logLevel;
private boolean skipPmdError;

Expand Down Expand Up @@ -154,11 +153,6 @@ public void setShowPmdLog( boolean showPmdLog )
this.showPmdLog = showPmdLog;
}

public void setColorizedLog( boolean colorizedLog )
{
this.colorizedLog = colorizedLog;
}

public void setLogLevel( String logLevel )
{
this.logLevel = logLevel;
Expand Down Expand Up @@ -263,11 +257,6 @@ public boolean isShowPmdLog()
return showPmdLog;
}

public boolean isColorizedLog()
{
return colorizedLog;
}

public String getLogLevel()
{
return logLevel;
Expand Down