[GRADLE-3186] IllegalArgumentException after upgrading to PMD 5.2.0 Created: 23/Oct/14  Updated: 29/Mar/15  Resolved: 29/Mar/15

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: René Gröschke (Inactive)
Resolution: Won't Fix Votes: 1


I upgraded to 5.2.0, and now I get "java.lang.IllegalArgumentException: Unknown Language 'java' for Rule JumbledIncrementer, supported Languages are" [empty].

Here's my config:

apply plugin: 'pmd'
dependencies {

Comment by Gradle Forums [ 23/Oct/14 ]

Do you explicitly configure any PMD rulesets? Also, can you try `pmd.toolVersion = "5.2.0"` instead of explicitly declaring PMD dependencies?

Comment by Gradle Forums [ 23/Oct/14 ]

With ..

apply plugin: 'pmd'
pmd.toolVersion = '5.2.0'

.. I get "java.lang.ClassNotFoundException: net.sourceforge.pmd.ant.PMDTask"

Here's our ruleset: [1]http://pastebin.com/8GbJXJ1i
[1] http://pastebin.com/8GbJXJ1i

Comment by Henrik [ 30/Oct/14 ]

This will probably be fixed in the next version of PMD, see https://sourceforge.net/p/pmd/bugs/1274/ and https://sourceforge.net/p/pmd/discussion/188193/thread/bdba2845/?limit=25#a044

Comment by Henrik [ 14/Nov/14 ]

This has been fixed in PMD 5.2.1. But pmd.toolVersion = '5.2.1' doesn't work, I still have to declare the dependency as described in this issue.

Comment by Martin Steiger [ 28/Mar/15 ]

I guess that this commit fixes the issue:


It's not part of Gradle 2.3, so I guess it will work with Gradle 2.4 once it's released.

Comment by René Gröschke (Inactive) [ 29/Mar/15 ]

There are two issues here. One is that gradle was not comparable with pmd 5.2.x which is fixed on master. So gradle 2.4 is pmd 5.2 compatible. The particular issue error reported here ("IllegalArgumentException after upgrading to PMD 5.2.0") is a bug in PMD. (see http://sourceforge.net/p/pmd/bugs/1274/ for details.) updating to 5.2.1 fixes the issue and works fine with the latest gradle nightly

Generated at Wed Jun 30 12:42:14 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.