Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maven-pmd-plugin version in Documentation. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

georgehipp
Copy link

@georgehipp georgehipp commented May 15, 2019

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#

**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#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant