You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Alex Rentz (JIRA)" <ji...@apache.org> on 2017/05/01 14:52:04 UTC

[jira] [Created] (MPMD-236) Honor pmd:pmd/cpd config in pmd:check/cpd-check goals

Alex Rentz created MPMD-236:
-------------------------------

             Summary: Honor pmd:pmd/cpd config in pmd:check/cpd-check goals
                 Key: MPMD-236
                 URL: https://issues.apache.org/jira/browse/MPMD-236
             Project: Maven PMD Plugin
          Issue Type: Improvement
          Components: CPD, PMD
            Reporter: Alex Rentz


In the PMD plugin, it seems that configuration for the pmd:pmd and cpd:cpd goals that are executed transitively by way of the pmd:check and cpd:cpd-check goals are not honored. For example, here's the specific issue I am seeing.
Let's say I need to run pmd on tests and want to fail the build. Intuitively you'd think I could do pmd:check and set includeTests=true. However, this doesn't work because pmd:check doesn't support includeTests. I am not interested in generating the report, and per the site documentation for the plugin, pmd:check generates the report anyway. However, it doesn't support the configuration associated with pmd:pmd.

What I would like to do is this (which doesn't work):
{code:xml}
                    <execution>
                        <id>pmd-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <includeTests>${pmd.includeTests}</includeTests>
                        </configuration>
                    </execution>{code}

What I have is this:
{code:xml}
                    <execution>
                        <id>pmd-check</id>
                        <goals>
                            <goal>check</goal>
                            <goal>pmd</goal> <!-- Is this needed? -->
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <includeTests>${pmd.includeTests}</includeTests>
                        </configuration>
                    </execution>{code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)