Thanks, Gerald.  This is exactly what I wanted and it worked just as you
described.  This mechanism will be useful for many other applications.

Tim

-----Original Message-----
From: Nunn, Gerald [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 17, 2007 1:52 PM
To: Maven Users List
Subject: RE: How to share a common checkstyle config across modules?

I jar my checkstyle configuration and then store it in an intranet Maven
repository. Projects can then declare a dependency on this jar using the
extensions tag in the build section of pom.xml. For example:

        <build>
        <extensions>
            <extension>
              <groupId>com.xxxx</groupId>
              <artifactId>xxxx-checkstyle</artifactId>
              <version>1.0.0</version>
            </extension>
        </extensions>
        </build>

        <reporting>
                <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
 
<configLocation>config/cibc_checks.xml</configLocation>
                </configuration>
            </plugin>

                </plugins>
        </reporting>

The configLocation is the classpath location in the xxxx-checkstyle.jar.

Hope this helps.

Gerald

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


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

Reply via email to