maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Vana (JIRA)" <j...@codehaus.org>
Subject [jira] Created: (MPMD-116) Methods Rule.start and Rule.end are not executed
Date Tue, 02 Mar 2010 16:11:55 GMT
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


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

        

Mime
View raw message