Class CpdExecutor

java.lang.Object
org.apache.maven.plugins.pmd.exec.CpdExecutor

public class CpdExecutor extends Object
Executes CPD with the configuration provided via CpdRequest.
  • Constructor Details

    • CpdExecutor

      public CpdExecutor(CpdRequest request)
  • Method Details

    • execute

      public static CpdResult execute(CpdRequest request) throws MavenReportException
      Throws:
      MavenReportException
    • main

      public static void main(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(String format, String outputEncoding) throws MavenReportException
      Create 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, String logLevel)
    • setupLogLevel

      protected void setupLogLevel(String logLevel)
    • buildClasspath

      protected static String buildClasspath()