[ http://jira.codehaus.org/browse/MNG-1113?page=comments#action_51253 ] 

Michael Böckling commented on MNG-1113:
---------------------------------------

Ok, I found out how to add your own checker classes and use them from whithin 
the custom XML configuration. The trick is to add a Jar containing your custom 
extensions as plugin dependency (didn't realize that was possible, i'm more and 
more in awe of M2). Wouldn't hurt to add it to the documentation, too. Here is 
a sample plugin entry from my POM, maybe it will help someone (this assumes the 
above modificationst to CheckstyleReport were made):

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.0-beta-3-SNAPSHOT</version>
        <dependencies>
          <dependency>
            <groupId>com.giniality.maven.checkstyle</groupId>
            <artifactId>checkstyle-extensions</artifactId>
            <version>1.0-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
            <configuration>
              <formatFile>
                
C:/DEVELOPMENT/Workspaces/Standard/TAJ-1-CodingStandardsConfig/conf/TAJ-1-CheckstyleProfile_v1.0.xml
              </formatFile>
            </configuration>
          </execution>
        </executions>
      </plugin>

> Plugin does not support using custom checkstyle XML config file
> ---------------------------------------------------------------
>
>          Key: MNG-1113
>          URL: http://jira.codehaus.org/browse/MNG-1113
>      Project: Maven 2
>         Type: Bug
>   Components: maven-checkstyle-plugin
>     Versions: 2.0-beta-3
>     Reporter: Vincent Massol
>     Assignee: Edwin Punzalan
>  Attachments: CheckstyleReport.java, MNG-1113-maven-checkstyle-plugin.patch, 
> checkstyle-config-file.patch, recommended.txt
>
>
> The plugin source code says:
>     /**
>      * Specifies the location of the checkstyle properties that will be used 
> to check the source.
>      *
>      * @parameter
>      */
>     private File propertiesFile;
> But in practice it's only loading *properties* and not the XML. The 
> getConfigFile() method is not right and needs to be modified to take into 
> account a custom checkstyle config file.

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to