Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.15.0
-
None
-
- maven-pmd-plugin: 3.15.0 (PMD 6.38.0)
- OpenJDK 8, 11, 16
- Maven 3.8.1 / 3.8.2
Description
After upgrading to maven-pmd-plugin 3.15, the analysis shows a "Could not find class [...]" warning for each scanned file. Earlier versions up to 3.14 (= pmd 6.29.0) aren't affected.
Exception Stacktrace:
[INFO] PMD version: 6.38.0 [WARNING] Could not find class <PROJECT CLASS>, due to: java.lang.IncompatibleClassChangeError: class net.sourceforge.pmd.lang.java.typeresolution.visitors.PMDASMVisitor has interface org.objectweb.asm.ClassVisitor as super class
The warning message appears for each class in the project.
Code Sample demonstrating the issue:
<!-- pom.xml --> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> <version>3.15.0</version> <configuration> <linkXRef>false</linkXRef> </configuration> </plugin> </plugins> </build> [...]
Steps to reproduce:
- Setup a Maven project with maven-pmd-plugin 3.15.0 with something to analyse
- mvn clean verify pmd:pmd
- The mentioned warning appears
Workaround:
Add dependency to org.ow2.asm for the pmd plugin:
<dependency> <groupId>org.ow2.asm</groupId> <artifactId>asm</artifactId> <version>9.2</version> </dependency>
Original issue reported to the pmd project.
Attachments
Attachments
Issue Links
- is blocked by
-
MPMD-326 Set Maven 3.1.1 as minimum version
- Closed
- links to