Uploaded image for project: 'Maven PMD Plugin'
  1. Maven PMD Plugin
  2. MPMD-259

FileNotFoundException with analysisCache=true, includeTests=true and no test classes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.9.0
    • 3.10.0
    • PMD
    • None

    Description

      If includeTests option is enabled but there are not test classes to check then PMD plugin fails with

      Failure executing PMD: [ERROR] Incremental analysis can't check auxclasspath contents
      java.io.FileNotFoundException: /home/lyor/workspace/C-B4-Server/analytics/c-analytics-engine-dal-api/target/test-classes (No such file or directory)

      In previous version this was quietly ignored - I believe same should be here.

      plugin configuration - using PMD 6.2.0 module
              <plugin>
                      <!-- to disable - mvn [commands...] -Dpmd.skip -->
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-pmd-plugin</artifactId>
                      <configuration>
                          <rulesets>
                              <ruleset>${workspace.root.dir}${file.separator}pmd-ruleset-cb4.xml</ruleset>
                          </rulesets>
                          <includeTests>true</includeTests>
                      </configuration>
                      <executions>
                          <execution>
                              <id>pmd-checker</id>
                              <!-- Note: phase must be AFTER detection of workspace root dir -->
                              <phase>process-test-classes</phase>
                              <goals>
                                  <goal>check</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
      

      Attachments

        Issue Links

          Activity

            People

              adangel Andreas Dangel
              lgoldstein Lyor Goldstein
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: