foo )
+ {
+ }
+
+}
diff --git a/src/it/MPMD-379-JDK21/verify.groovy b/src/it/MPMD-379-JDK21/verify.groovy
new file mode 100644
index 00000000..2846ad3c
--- /dev/null
+++ b/src/it/MPMD-379-JDK21/verify.groovy
@@ -0,0 +1,24 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File buildLog = new File( basedir, 'build.log' )
+assert buildLog.exists()
+assert buildLog.text.contains( '[INFO] PMD Failure: com.mycompany.app.Foo:26 Rule:UnusedFormalParameter Priority:3' )
+assert !buildLog.text.contains( '[WARNING] PMD' )
diff --git a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
index 27db1f54..e781b861 100644
--- a/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
+++ b/src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
@@ -63,16 +63,19 @@
@Mojo(name = "pmd", threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST)
public class PmdReport extends AbstractPmdReport {
/**
- * The target JDK to analyze based on. Should match the source used in the compiler plugin. Valid values
- * with the default PMD version are
+ * The target JDK to analyze based on. Should match the source used in the compiler plugin.
+ * Valid values depend on the used PMD version. With the default PMD version valid values are
* currently 1.3
, 1.4
, 1.5
, 1.6
, 1.7
,
* 1.8
, 9
, 10
, 11
, 12
, 13
,
* 14
, 15
, 16
, 17
, 18
, 19
,
- * and 20
.
+ * 20
, 21
, and 22
.
*
* You can override the default PMD version by specifying PMD as a dependency,
* see Upgrading PMD at Runtime.
*
+ * To see the supported Java versions for each PMD version, see
+ * Java support (PMD).
+ *
*
* Note: this parameter is only used if the language parameter is set to java
.
*