Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-29414

pmd-plugin and checkstyle-plugin analysis doesn't work when using pmd:check


    • 5.0.0-beta2

      I have project configured with pmd:check run during verify phase:


      The above configuration automatically fails build when there is any pmd violation, additionally there is a pmd.xml file created in given modules target directory with description of violations.
      I've configured my build with 'mvn clean verify' and added pmd plugin (from analysis) to run always even when build fails. But after a test build with pmd violations plugin didn't notice them.

      More over I tested this with checkstyle plugin and there is the same problem, build fails because of checkstyle violation but plugin reports 0 warnings.

      Here's jenkins log for checkstyle plugin:

      [INFO] --- maven-checkstyle-plugin:2.15:check (check-sources) @ xyz-tcusers-model ---
      [INFO] Starting audit...
      /opt/app/jenkins/jobs/XYZ-master/workspace/ContentGenerator/model/xyz/xyz-tcusers-model/src/main/java/com/example/xyz/tcusers/service/TcUserService.java:37: 'if' child have incorrect indentation level 8, expected level should be 12.
      Audit done.
      [CHECKSTYLE] Parsing file /opt/app/jenkins/jobs/XYZ-master/workspace/ContentGenerator/model/xyz/xyz-tcusers-model/target/checkstyle-result.xml
      [CHECKSTYLE] Successfully parsed file /opt/app/jenkins/jobs/XYZ-master/workspace/ContentGenerator/model/xyz/xyz-tcusers-model/target/checkstyle-result.xml of module xyz-tcusers-model with 1 unique warning and 0 duplicates.
      [CHECKSTYLE] Computing warning deltas based on reference build #3555
      [PMD] No report found for mojo check
      [JENKINS] Archiving disabled

            drulli Ulli Hafner
            krzyk krzyk
            0 Vote for this issue
            2 Start watching this issue