Update maven-pmd-plugin version in Documentation. - #13
Open
georgehipp wants to merge 1 commit into
Open
georgehipp wants to merge 1 commit into
georgehipp wants to merge 1 commit into
Conversation
**maven-pmd-plugin version 3.0.1 does not support JDK 1.8:**
Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.0.1:pmd (default-cli) An error has occurred in PMD Report report generation.: Unsupported targetJdk value '1.8'.
**maven-pmd-plugin Latest Version does not support the current ruleset:**
Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.12.0:pmd (default-cli) Execution default-cli of goal org.apache.maven.plugins:maven-pmd-plugin:3.12.0:pmd failed: Unable to exclude rules [UselessParentheses]; perhaps the rule name is mispelled?
**maven-pmd-plugin version 3.6 supports JDK 1.8 and allows the current ruleset.**
This change will allow users to use the Adobe recommended Java 8 and not fail due to the outdated ruleset.
Future changes should be to the ruleset, ensuring the latest version of PMD and the maven-pmd-plugin is supported.
**Validated with**
Versions:
Apache Maven 3.5.0
Java version: 1.8.0_202, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
Command:
mvn pmd:pmd -Panalysis
Plugin Configs:
<profile>
<id>analysis</id>
...
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>[3.0.1 | 3.6 | 3.12.0]</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>pmd</goal>
<goal>cpd</goal>
<!-- build will fail on warnings -->
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
...
</profile>
If a different JDK version is needed, <targetJdk>[1.6 | 1.7 | etc]</targetJdk> can be used.
*Example:*
<configuration>
<targetJdk>1.6</targetJdk>
</configuration>
Link: https://maven.apache.org/plugins/maven-pmd-plugin/examples/targetJdk.html#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
maven-pmd-plugin version 3.0.1 does not support JDK 1.8:
Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.0.1:pmd (default-cli) An error has occurred in PMD Report report generation.: Unsupported targetJdk value '1.8'.
maven-pmd-plugin Latest Version does not support the current ruleset:
Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.12.0:pmd (default-cli) Execution default-cli of goal org.apache.maven.plugins:maven-pmd-plugin:3.12.0:pmd failed: Unable to exclude rules [UselessParentheses]; perhaps the rule name is mispelled?
maven-pmd-plugin version 3.6 supports JDK 1.8 and allows the current ruleset.
This change will allow users to use the Adobe recommended Java 8 and not fail due to the outdated ruleset.
Future changes should be to the ruleset, ensuring the latest version of PMD and the maven-pmd-plugin is supported.
Validated with
Versions:
Apache Maven 3.5.0
Java version: 1.8.0_202, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"
Command:
mvn pmd:pmd -Panalysis
Plugin Configs:
If a different JDK version is needed,
<targetJdk>[1.6 | 1.7 | etc]</targetJdk>can be used.Example:
Link: https://maven.apache.org/plugins/maven-pmd-plugin/examples/targetJdk.html#