Class PmdExecutor

  • public class PmdExecutor
    extends java.lang.Object
    Executes PMD with the configuration provided via PmdRequest.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.String buildClasspath()  
      static net.sourceforge.pmd.renderers.Renderer createRenderer​(java.lang.String format, java.lang.String outputEncoding)
      Create and return the correct renderer for the output type.
      static PmdResult execute​(PmdRequest request)  
      static void main​(java.lang.String[] args)
      Execute PMD analysis from CLI.
      protected void setupLogLevel​(java.lang.String logLevel)  
      protected void setupPmdLogging​(boolean showPmdLog, boolean colorizedLog, java.lang.String logLevel)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PmdExecutor

        public PmdExecutor​(PmdRequest request)
    • Method Detail

      • 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

        args -
      • createRenderer

        public static net.sourceforge.pmd.renderers.Renderer createRenderer​(java.lang.String format,
                                                                            java.lang.String outputEncoding)
                                                                     throws MavenReportException
        Create and return the correct renderer for the output type.
        the renderer based on the configured output
        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()