You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Seth Wilcox (Jira)" <ji...@apache.org> on 2022/04/07 22:06:00 UTC
[jira] (MPMD-303) Configuration is ignored
[ https://issues.apache.org/jira/browse/MPMD-303 ]
Seth Wilcox deleted comment on MPMD-303:
----------------------------------
was (Author: laoseth):
To clarify, this occurs when it is part of a larger build as well as when you run directly from the command line. After a lot of debugging, i was able to verify that the sourceEncoding attribute was the only config that was never being read, and after the patch in [https://github.com/apache/maven-pmd-plugin/pull/64] was applied locally, files with UTF-8 no longer caused stacks in analysis. I think there is a good chance this issue can be hidden, as it is defaulting to the system default encoding now, which especially in the nix world is UTF-8 anyways.
> Configuration is ignored
> ------------------------
>
> Key: MPMD-303
> URL: https://issues.apache.org/jira/browse/MPMD-303
> Project: Maven PMD Plugin
> Issue Type: Bug
> Components: PMD
> Affects Versions: 3.13.0
> Reporter: Luigi Berrettini
> Priority: Critical
> Attachments: poc-mvn-pmd-plugin.zip
>
>
> I configured the reporting plugin this way:
> {noformat}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>3.13.0</version>
> <configuration>
> <rulesets>
> <ruleset>/category/java/bestpractices.xml</ruleset>
> <ruleset>/category/java/errorprone.xml</ruleset>
> <ruleset>/category/java/security.xml</ruleset>
> <ruleset>/category/java/performance.xml</ruleset>
> <ruleset>/category/java/multithreading.xml</ruleset>
> <ruleset>/category/java/design.xml</ruleset>
> <ruleset>/category/java/codestyle.xml</ruleset>
> <ruleset>/category/java/documentation.xml</ruleset>
> </rulesets>
> <includeTests>true</includeTests>
> <failurePriority>1</failurePriority>
> <minimumPriority>1</minimumPriority>
> <verbose>true</verbose>
> <showPmdLog>true</showPmdLog>
> <printFailingErrors>true</printFailingErrors>
> <failOnViolation>false</failOnViolation>
> <skip>false</skip>
> <skipEmptyReport>false</skipEmptyReport>
> </configuration>
> </plugin>{noformat}
>
> When I run *_mvn site_* or *_mvn pmd:pmd_* no output is display on the console and the default ruleset is used since only *_target\pmd\rulesets\maven-pmd-plugin-default.xml_* is generated.
> Looking at the code on GitHub I see the repo contains only the default ruleset.
>
> Moreover the build plugin configuration does not support rulesets which would be a nice to have.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)