Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ under the License.
<doxiaVersion>1.11.1</doxiaVersion>
<doxiaSitetoolsVersion>1.11.1</doxiaSitetoolsVersion>
<javaVersion>8</javaVersion><!-- Because PMD 6.35.0+ requires Java 8 -->
<pmdVersion>6.54.0</pmdVersion>
<pmdVersion>6.55.0</pmdVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<aetherVersion>1.0.0.v20140518</aetherVersion>
<sitePluginVersion>3.12.1</sitePluginVersion>
Expand Down
28 changes: 28 additions & 0 deletions src/it/MPMD-365-JDK20/invoker.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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.

invoker.java.version = 1.8+

# available toolchains under linux:
# https://github.com/apache/infrastructure-p6/blob/production/modules/build_nodes/files/toolchains.xml

# the jdk toolchain "20:openjdk" is selected in pom.xml
invoker.toolchain.jdk.version = 20
invoker.toolchain.jdk.vendor = openjdk

invoker.goals = clean verify
invoker.buildResult = failure
95 changes: 95 additions & 0 deletions src/it/MPMD-365-JDK20/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugins.pmd.it</groupId>
<artifactId>MPMD-365-JDK20</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>20</java.version>
</properties>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<target>${java.version}</target>
<source>${java.version}</source>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<linkXRef>false</linkXRef>
<skipPmdError>false</skipPmdError>
<skip>false</skip>
<failOnViolation>true</failOnViolation>
<failurePriority>4</failurePriority>
<printFailingErrors>true</printFailingErrors>
<targetJdk>${java.version}</targetJdk>
<minimumTokens>100</minimumTokens>
</configuration>
<executions>
<execution>
<id>default</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>toolchain</goal>
</goals>
</execution>
</executions>
<configuration>
<toolchains>
<jdk>
<version>${java.version}</version>
<vendor>openjdk</vendor>
</jdk>
</toolchains>
</configuration>
</plugin>
</plugins>
</build>
</project>
25 changes: 25 additions & 0 deletions src/it/MPMD-365-JDK20/src/main/java/com/mycompany/app/App.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package com.mycompany.app;

/*
* 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.
*/

public class App
{

}
30 changes: 30 additions & 0 deletions src/it/MPMD-365-JDK20/src/main/java/com/mycompany/app/Foo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package com.mycompany.app;

/*
* 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.
*/

import java.util.ArrayList;

public class Foo
{
public Foo( final ArrayList<String> foo )
{
}

}
24 changes: 24 additions & 0 deletions src/it/MPMD-365-JDK20/verify.groovy
Original file line number Diff line number Diff line change
@@ -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]' )
3 changes: 2 additions & 1 deletion src/main/java/org/apache/maven/plugins/pmd/PmdReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public class PmdReport
* with the default PMD version are
* currently <code>1.3</code>, <code>1.4</code>, <code>1.5</code>, <code>1.6</code>, <code>1.7</code>,
* <code>1.8</code>, <code>9</code>, <code>10</code>, <code>11</code>, <code>12</code>, <code>13</code>,
* <code>14</code>, <code>15</code>, <code>16</code>, <code>17</code>, <code>18</code>, and <code>19</code>.
* <code>14</code>, <code>15</code>, <code>16</code>, <code>17</code>, <code>18</code>, <code>19</code>,
* and <code>20</code>.
*
* <p> You can override the default PMD version by specifying PMD as a dependency,
* see <a href="examples/upgrading-PMD-at-runtime.html">Upgrading PMD at Runtime</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion src/site/apt/examples/upgrading-PMD-at-runtime.apt.vm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Upgrading PMD at Runtime
*--------------------------------------------------------------------------------*--------------------------------------------------*
| <<maven-pmd-plugin>> | <<PMD>> |
*--------------------------------------------------------------------------------*--------------------------------------------------*
| {{{https://maven.apache.org/plugins-archives/maven-pmd-plugin-3.21.0/}3.21.0}} | {{{https://pmd.github.io/pmd-6.54.0/}6.54.0}} |
| {{{https://maven.apache.org/plugins-archives/maven-pmd-plugin-3.21.0/}3.21.0}} | {{{https://pmd.github.io/pmd-6.55.0/}6.55.0}} |
*--------------------------------------------------------------------------------*--------------------------------------------------*
| {{{https://maven.apache.org/plugins-archives/maven-pmd-plugin-3.20.0/}3.20.0}} | {{{https://pmd.github.io/pmd-6.53.0/}6.53.0}} |
*--------------------------------------------------------------------------------*--------------------------------------------------*
Expand Down
5 changes: 4 additions & 1 deletion src/site/markdown/releasenotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ under the License.

**GitHub:** <https://github.com/apache/maven-pmd-plugin/releases/tag/maven-pmd-plugin-3.21.0>

### 🚀 New features and improvements
* [MPMD-365](https://issues.apache.org/jira/browse/MPMD-365) - Support Java 20 ([#116](https://github.com/apache/maven-pmd-plugin/pull/116)) @adangel
### 🐛 Bug Fixes
### 👻 Maintenance
### 📝 Documentation updates
### 📦 Dependency updates
* [MPMD-364](https://issues.apache.org/jira/browse/MPMD-364) - Upgrade to PMD 6.54.0 ([#112](https://github.com/apache/maven-pmd-plugin/pull/112)) (@adangel)
* [MPMD-364](https://issues.apache.org/jira/browse/MPMD-364) - Upgrade to PMD 6.55.0 ([#115](https://github.com/apache/maven-pmd-plugin/pull/115)) @dependabot
* [MPMD-364](https://issues.apache.org/jira/browse/MPMD-364) - Upgrade to PMD 6.54.0 ([#112](https://github.com/apache/maven-pmd-plugin/pull/112)) @adangel

## Version 3.20.0

Expand Down