maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Dangel (JIRA)" <>
Subject [jira] [Commented] (MPMD-171) Rule properties are ignored when run under MPMD
Date Wed, 03 Jun 2015 17:25:38 GMT


Andreas Dangel commented on MPMD-171:

How do you exactly generate the PMD report?

I just checked out rsb and have seen, that pmd is only configured in the {{reporting}} section.
This means, your custom ruleset should be used for the maven site generation ({{mvn site}}).

If you want to run pmd manually, e.g. via {{mvn pmd:pmd}} then you'll need to configure the
pmd plugin additionally under {{build/plugins}}. I have done this and I found two instances
of "LongVariable":

<violation beginline="63" endline="63" begincolumn="33" endcolumn="61" rule="LongVariable"
ruleset="Naming" package="rsb" class="Factory" variable="INTROSPECTION_DISPLAYNAME_KEY" externalInfoUrl=""
<violation beginline="119" endline="119" begincolumn="21" endcolumn="46" rule="LongVariable"
ruleset="Naming" package="rsb.util" class="UUIDTools" method="setVersionAndVariant" variable="clockSeqHiAndReservedByte8"

Both are variable names indeed longer than 25 characters (INTROSPECTION_DISPLAYNAME_KEY has
29 and clockSeqHiAndReservedByte8 has 26), so this seems to be ok.

Can you give other examples, where the properties are ignored? Maybe there is really another
bug hidden somewhere in PMD...


> Rule properties are ignored when run under MPMD
> -----------------------------------------------
>                 Key: MPMD-171
>                 URL:
>             Project: Maven PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 3.0.1
>         Environment: Linux
>            Reporter: Johannes Wienke
>            Assignee: Michael Osipov
>             Fix For: 3.3, 3.4
> For our project I have defined a custom ruleset for PMD in an XML file [1]. This ruleset
defines properties for some of the standard PMD rules using this syntax:
> {noformat}
> <rule ref="rulesets/java/naming.xml/LongVariable">
>     <properties>
>         <property name="minimum" value="25"/>
>     </properties>
> </rule>
> {noformat}
> When I execute PMD using a parallel ant file we maintain, these custom properties are
respected correctly. However, when executing PMD through maven, the properties are completely
> The pom.xml we are using is available at [2].
> [1]
> [2]

This message was sent by Atlassian JIRA

View raw message