Class PmdExecutor
- java.lang.Object
-
- org.apache.maven.plugins.pmd.exec.PmdExecutor
-
public class PmdExecutor extends java.lang.ObjectExecutes PMD with the configuration provided viaPmdRequest.
-
-
Constructor Summary
Constructors Constructor Description PmdExecutor(PmdRequest 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.renderers.RenderercreateRenderer(java.lang.String format, java.lang.String outputEncoding)Create and return the correct renderer for the output type.static PmdResultexecute(PmdRequest request)static voidmain(java.lang.String[] args)Execute PMD analysis from CLI.protected voidsetupLogLevel(java.lang.String logLevel)protected voidsetupPmdLogging(boolean showPmdLog, boolean colorizedLog, java.lang.String logLevel)
-
-
-
Constructor Detail
-
PmdExecutor
public PmdExecutor(PmdRequest request)
-
-
Method Detail
-
execute
public static PmdResult execute(PmdRequest request) throws MavenReportException
- Throws:
MavenReportException
-
main
public static void main(java.lang.String[] args)
Execute PMD analysis from CLI.Single arg with the filename to the serialized
PmdRequest.Exit-code: 0 = success, 1 = failure in executing
- Parameters:
args-
-
createRenderer
public static net.sourceforge.pmd.renderers.Renderer 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()
-
-