The Error “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0 “, is an error that is invoked when you are working on java and you are trying to run a multi-module Maven Java project.
Given below is the snippet of the error you might get:
java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0
The error, “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0” is seen because either you are using maven version less than 3.8.6 version or you are not using the maven-pmd-plugin 3.17.0 version.
To fix the error, “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0 ” upgrade maven version to greater than version 3.8.6 or use the maven-pmd-plugin 3.17.0 version and error would be fixed.
As an alternate, the error can also be solved by using maven-pmd-plugin 3.19.0, which contains the fix for MPMD-353.
Steps to fix the error “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0”:
Step 1: Install Maven 3.8.6 or a later version.
Step 2: Continue using maven-pmd-plugin 3.17.0
Step 3: Upgrade to Maven PMD Plugin 3.19.0 to have the MPMD-353 Fix.
This should help you fix the error, “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0 “.
Conclusion
To fix the error, “java.lang.NoSuchMethodError thrown by Maven PMD Plugin 3.18.0 ” you will have to use maven version greater than version 3.8.6.
The error can also solved by using maven-pmd-plugin 3.17.0. The error can also be solved by using maven-pmd-plugin 3.19.0, which contains the fix for MPMD-353