I have a multimodule maven project and I can't find a way to disable pmd, checktyle for groovy sources.
I do run a command from the top level:
mvn clean install pmd:pmd checktyle:checkstyle
The structure of my project is:
pom.xml
-module1
src
main
groovy
test
groovy
-module2
src
main
groovy
java
test
groovy
I don't want pmd/checkstyle to inspect my groovy files. Here is parent pom section inside pluginManagement:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>2.7.1</version>
<configuration>
<format>xml</format>
<targetJdk>1.6</targetJdk>
<linkXRef>false</linkXRef>
<!--
<excludeRoots>
<excludeRoot>${project.basedir}/src/main/groovy</excludeRoot>
<excludeRoot>${project.basedir}/src/test/groovy</excludeRoot>
</excludeRoots>
-->
<!--
<excludeRoots>
<excludeRoot>
${project.basedir}/target/generated-sources/groovy-stubs
</excludeRoot>
</excludeRoots>
-->
<excludes>
<exclude>**/generated-sources/groovy-stubs/**/*.java</exclude>
</excludes>
<rulesets>
<ruleset>
${rule.repository.url}/pmd/rules/pmd-rules/1.0.4.2/pmd-rules-1.0.4.2.xml
</ruleset>
</rulesets>
</configuration>
</plugin>
module1 doesn't have in it's pom.xml any references to pmd/checktyle plugin. Anyway pmd, check style is applied to the groovy sources.
module2 does have reference to these plugins in it's pom.xml And still groovy is not ignored.
What do I do wrong?