Maven PMD Plugin
  1. Maven PMD Plugin
  2. MPMD-133

Parameters for pmd:check/cpd-check should be separate from pmd:pmd/cpd

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.5
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)

      Description

      Currently, the pmd:check and pmd:cpd-check goals do not have, e.g., their own minimumPriority parameter; they re-use the parameter values from pmd:pmd and pmd:cpd. This design makes it tricky to configure, e.g., a pmd:check execution that fails the build only on severe violations while at the same time having PMD/CPD reports which also report less severe violations.

      The only (counter-intuitive) way I can think of is configuring the stricter minimumPriority in the pluginManagement and then overriding it with a laxer value in the reportPlugin's configuration. Configuring the {pmd:check}} execution directly, which is a much more intuitive way to achieve the same effect, is currently impossible.

        Issue Links

          Activity

          Andreas Sewe created issue -
          Hide
          Dennis Lundberg added a comment -

          Can you show us the configuration you have tried to use?

          Show
          Dennis Lundberg added a comment - Can you show us the configuration you have tried to use?
          Hide
          Andreas Sewe added a comment -

          OK, figured out that that's what pmd:check's failurePriority parameter is for. (Using it you can configure pmd:check to fail on only a subset of checks pmd:pmd performs.)

          Originally, I was trying to get pmd:check to run with its own, less strict minimumPriority value. This was ugly to configure, as the pmd:check's execution cannot be told another value for minimumPriority.

          Anyway, I think this use case should be documented on the plugin's site: http://maven.apache.org/plugins/maven-pmd-plugin/examples/violationChecking.html.

          Show
          Andreas Sewe added a comment - OK, figured out that that's what pmd:check 's failurePriority parameter is for. (Using it you can configure pmd:check to fail on only a subset of checks pmd:pmd performs.) Originally, I was trying to get pmd:check to run with its own, less strict minimumPriority value. This was ugly to configure, as the pmd:check 's execution cannot be told another value for minimumPriority . Anyway, I think this use case should be documented on the plugin's site: http://maven.apache.org/plugins/maven-pmd-plugin/examples/violationChecking.html .
          Dennis Lundberg made changes -
          Field Original Value New Value
          Link This issue relates to MPMD-190 [ MPMD-190 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:01:39 UTC 2015 [ 1428235299271 ]
          Mark Thomas made changes -
          Workflow jira [ 12722873 ] Default workflow, editable Closed status [ 12756414 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:25:00 UTC 2015 [ 1428279900867 ]
          Mark Thomas made changes -
          Workflow jira [ 12960502 ] Default workflow, editable Closed status [ 12997707 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Andreas Sewe
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development