Here's an extract from my pom.xml where i apply different checkstyle rules to my main src and my test code.

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <executions>
                <execution>
                    <id>check-main-src</id>
                    <phase>compile</phase>
                   <configuration>
                        <propertiesFile>checkstyle-src.xml</propertiesFile>
                        <failsOnError>true</failsOnError>
                    </configuration>
                    <goals>
                        <goal>checkstyle</goal>
                     </goals>
                 </execution>
                <execution>
                    <id>check-test-src</id>
                    <phase>test-compile</phase>
                   <configuration>
                        <propertiesFile>checkstyle-test.xml</propertiesFile>
                        <failsOnError>true</failsOnError>
                        <sourceDirectory>src/test</sourceDirectory>
                    </configuration>
                    <goals>
                        <goal>checkstyle</goal>
                     </goals>
                 </execution>
             </executions>
        </plugin>
    <plugins>
</build>

however, as this jira issue (and my own experience) makes plain, right now the propertiesFile is ignored so you'll have to put up with the default for a while until they fix this, or apply the patch yourself.
http://jira.codehaus.org/browse/MNG-1113

Kind regards,
Dave Sag




 


"Mark Kuzmycz" <[EMAIL PROTECTED]> wrote on 22/10/2005 07:24:03 PM:

> How do I specify a customized checkstyle format. The source code for the
> checkstyle report suggests that it only knows about sun, turbine and
> avalon.
>  
> Regards,
> Mark.
>
> _______________
> Siebel
> IT'S ALL ABOUT THE CUSTOMER
> Visit www.siebel.com
>
> This e-mail message is for the sole use of the intended recipient(s)
> and contains confidential and/or privileged information belonging to
> Siebel Systems, Inc. or its customers or partners. Any unauthorized
> review, use, copying, disclosure or distribution of this message is
> strictly prohibited. If you are not an intended recipient of this
> message, please contact the sender by reply e-mail and destroy all
> soft and hard copies of the message and any attachments. Thank you
> for your cooperation.

Reply via email to