Description
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):
<execution> <id>pmd-check</id> <goals> <goal>check</goal> </goals> <phase>verify</phase> <configuration> <includeTests>${pmd.includeTests}</includeTests> </configuration> </execution>
What I have is this:
<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>
Attachments
Issue Links
- relates to
-
MPMD-242 RFE: Option to apply different rules for main and test sources
- Open