Class CpdExecutor
- java.lang.Object
-
- org.apache.maven.plugins.pmd.exec.CpdExecutor
-
public class CpdExecutor extends java.lang.ObjectExecutes CPD with the configuration provided viaCpdRequest.
-
-
Constructor Summary
Constructors Constructor Description CpdExecutor(CpdRequest request)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static java.lang.StringbuildClasspath()static net.sourceforge.pmd.cpd.renderer.CPDRenderercreateRenderer(java.lang.String format, java.lang.String outputEncoding)Create and return the correct renderer for the output type.static CpdResultexecute(CpdRequest request)static voidmain(java.lang.String[] args)Execute CPD analysis from CLI.protected voidsetupLogLevel(java.lang.String logLevel)protected voidsetupPmdLogging(boolean showPmdLog, boolean colorizedLog, java.lang.String logLevel)
-
-
-
Constructor Detail
-
CpdExecutor
public CpdExecutor(CpdRequest request)
-
-
Method Detail
-
execute
public static CpdResult execute(CpdRequest request) throws MavenReportException
- Throws:
MavenReportException
-
main
public static void main(java.lang.String[] args)
Execute CPD analysis from CLI.Single arg with the filename to the serialized
CpdRequest.Exit-code: 0 = success, 1 = failure in executing
- Parameters:
args-
-
createRenderer
public static net.sourceforge.pmd.cpd.renderer.CPDRenderer createRenderer(java.lang.String format, java.lang.String outputEncoding) throws MavenReportExceptionCreate and return the correct renderer for the output type.- Returns:
- the renderer based on the configured output
- Throws:
MavenReportException- if no renderer found for the output type
-
setupPmdLogging
protected void setupPmdLogging(boolean showPmdLog, boolean colorizedLog, java.lang.String logLevel)
-
setupLogLevel
protected void setupLogLevel(java.lang.String logLevel)
-
buildClasspath
protected static java.lang.String buildClasspath()
-
-