can we include maven pmd plugin execution within build goal ?

Posted by RN on Stack Overflow See other posts from Stack Overflow or by RN
Published on 2010-06-08T14:32:28Z Indexed on 2010/06/08 14:42 UTC
Read the original article Hit count: 271

Filed under:
|
|
|

Guys, I wanted generate the pmd report while building the project so I have added plugin to build section of my pom.xml but still it don't execute until I explicitly call mvn clean install pmd:pmd. I want to execute it with mvn clean install itself. is it possible ? my pom entries are as under:

<build>
    <plugins>
        <plugin>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <skip>false</skip>
                <targetJdk>${compile.source}</targetJdk>
                <rulesets>
                    <ruleset>./current.pmd.rules.xml</ruleset>
                </rulesets>
                <excludes>
                    <exclude>com/cm/**/*.java</exclude>
                    <exclude>com/sm/**/*.java</exclude>
                </excludes>
                <linkXref>true</linkXref>
                <failOnViolation>true</failOnViolation>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jxr-plugin</artifactId>
        </plugin>
        <plugin>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.0.1</version>
        </plugin>
    </plugins>

</build>

Thanks in advance.

© Stack Overflow or respective owner

Related posts about apache

Related posts about plugins