[
http://jira.codehaus.org/browse/MPMD-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Herve Boutemy closed MPMD-116.
------------------------------
Resolution: Fixed
Fix Version/s: 2.5
Assignee: Herve Boutemy
done in r939821.
> Methods Rule.start and Rule.end are not executed
> ------------------------------------------------
>
> Key: MPMD-116
> URL: http://jira.codehaus.org/browse/MPMD-116
> Project: Maven 2.x PMD Plugin
> Issue Type: Bug
> Components: PMD
> Affects Versions: 2.4
> Environment: Windows XP
> Maven 2.2.1
> Reporter: David Vana
> Assignee: Herve Boutemy
> Fix For: 2.5
>
>
> Methods start() and end() from interface Rule are not executed when running
> pmd as a mvn pluggin.
> {code:title=SomeCustomRule.java|borderStyle=solid}
> public class SomeCustomRule extends AbstractJavaRule {
> public void start(RuleContext ctx) {
> System.out.println("START");
> }
> public void end(RuleContext ctx) {
> System.out.println("END");
> }
> {code}
> {code:xml|title=pom.xml|borderStyle=solid}
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>2.4</version>
> <configuration>
> <targetJdk>1.6</targetJdk>
> <rulesets>
> <ruleset>some_custom_ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>sandbox</groupId>
> <artifactId>some_custom_ruleset</artifactId>
> <version>1.0</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
> {code}
> {code:xml|title=some_custom_ruleset.xml|borderStyle=solid}
> <ruleset>
> <description>Some custom ruleset.</description>
> <rule name="SomeCustomRule"
> message="Testing rule."
> class="SomeCustomRule">
> <description>
> Testing rule.
> </description>
> <priority>3</priority>
> <example>
> <![CDATA[
> ]]>
> </example>
> </rule>
> </ruleset>
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira