• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • pmd-plugin
    • None
    • Jenkins 1.427
      PMD 3.2.0

      I generate PMD reports through the "mvn clean install site" command. This generates PMD report files correctly within the Maven site. But the PMD jenkins plugin doesn't seem to pick them up at all. In the build status I see:

      PMD: 0 warnings from 0 PMD files

      Plus I know from the Maven site reports that there are some PMD warnings.

      My Maven project 4 modules. The parent pom configures the PMD plugin, but since it has no code, it contains no pmd.xml

      If I look at the Jenkins workspace, I can find the pmd.xml correctly in <module>/target/pmd.xml, for each module.

        1. pmd.xml
          0.4 kB
        2. pmdtest.zip
          12 kB

          [JENKINS-10820] PMD plugin does not find report files

          Marc Boscher created issue -

          Marc Boscher added a comment -

          I also have the Checkstyle plugin setup and that is working fine:
          Checkstyle: 0 warnings from 4 Checkstyle files.

          Marc Boscher added a comment - I also have the Checkstyle plugin setup and that is working fine: Checkstyle: 0 warnings from 4 Checkstyle files.

          Ulli Hafner added a comment -

          Is this a freestyle or m2 project? If freestyle, which pattern did you use? Please check if the selected pmd.xml file actually is an XML results file.

          Ulli Hafner added a comment - Is this a freestyle or m2 project? If freestyle, which pattern did you use? Please check if the selected pmd.xml file actually is an XML results file.

          Marc Boscher added a comment -

          It's an m2 project. I am attaching a sample found in /<module>/target. There are no current warning since we just fixed them, but 2 days ago there were some and jenkins still found 0 pmd files.

          Marc Boscher added a comment - It's an m2 project. I am attaching a sample found in /<module>/target. There are no current warning since we just fixed them, but 2 days ago there were some and jenkins still found 0 pmd files.

          Marc Boscher added a comment -

          Example PMD report generated by in /<module>/target/

          Marc Boscher added a comment - Example PMD report generated by in /<module>/target/
          Marc Boscher made changes -
          Attachment New: pmd.xml [ 20760 ]

          Ulli Hafner added a comment -

          Is there anything with the PMD prefix in the console log of your build? E.g.:

          [PMD] Aggregating results of Static Analysis Plug-ins Parent POM
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded
          

          Ulli Hafner added a comment - Is there anything with the PMD prefix in the console log of your build? E.g.: [PMD] Aggregating results of Static Analysis Plug-ins Parent POM [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded

          Ulli Hafner added a comment -

          How do you invoke PMD (which maven goal?). Is your build successful?

          Ulli Hafner added a comment - How do you invoke PMD (which maven goal?). Is your build successful?

          Marc Boscher added a comment -

          For each of the modules I get:

          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded

          Then a bit lower:
          [PMD] Skipping maven reporter: there is already a result available.

          Then towards the end of the log:

          [PMD] Aggregating results of ds-core
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded
          [PMD] Aggregating results of ds-cm-default
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded
          [PMD] Aggregating results of ds-web
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded
          [PMD] Aggregating results of ds-cm-tester
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded
          [PMD] Aggregating results of ds-project
          [PMD] Using set difference to compute new warnings
          [PMD] Not changing build status, since no threshold has been exceeded

          PMD is invoked indirectly through the "site" goal

          Marc Boscher added a comment - For each of the modules I get: [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded Then a bit lower: [PMD] Skipping maven reporter: there is already a result available. Then towards the end of the log: [PMD] Aggregating results of ds-core [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded [PMD] Aggregating results of ds-cm-default [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded [PMD] Aggregating results of ds-web [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded [PMD] Aggregating results of ds-cm-tester [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded [PMD] Aggregating results of ds-project [PMD] Using set difference to compute new warnings [PMD] Not changing build status, since no threshold has been exceeded PMD is invoked indirectly through the "site" goal

          Having the same problem as Marc with m3 projects.

          Doug Rothauser added a comment - Having the same problem as Marc with m3 projects.

            drulli Ulli Hafner
            marc_boscher Marc Boscher
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: