You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by oc...@apache.org on 2006/07/24 12:33:43 UTC
svn commit: r424998 - in /maven/plugins/trunk/maven-checkstyle-plugin: ./
src/main/java/org/apache/maven/plugin/checkstyle/ src/site/ src/site/apt/
src/site/apt/examples/ src/site/fml/
Author: oching
Date: Mon Jul 24 03:33:41 2006
New Revision: 424998
URL: http://svn.apache.org/viewvc?rev=424998&view=rev
Log:
PR: MCHECKSTYLE-49
Revised docs to conform with the documentation standard. Added new docs.
Added:
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-checker-config.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-property-expansion.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/multi-module-config.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/suppressions-filter.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/index.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/
maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/faq.fml
Removed:
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/customize.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/howto.apt
maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/tips.apt
Modified:
maven/plugins/trunk/maven-checkstyle-plugin/pom.xml
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java
maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java
maven/plugins/trunk/maven-checkstyle-plugin/src/site/site.xml
Modified: maven/plugins/trunk/maven-checkstyle-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/pom.xml?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/pom.xml Mon Jul 24 03:33:41 2006
@@ -2,7 +2,7 @@
<parent>
<artifactId>maven-plugins</artifactId>
<groupId>org.apache.maven.plugins</groupId>
- <version>1</version>
+ <version>2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<prerequisites>
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReport.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -130,7 +130,7 @@
private boolean enableFilesSummary;
/**
- * Specifies if the Files summary should be enabled or not.
+ * Specifies if the RSS should be enabled or not.
*
* @parameter expression="${checkstyle.enable.rss}"
* default-value="true"
@@ -288,6 +288,8 @@
private String suppressionsLocation;
/**
+ * The key to be used in the properties for the suppressions file.
+ *
* @parameter expression="${checkstyle.suppression.expression}"
* @since 2.1
*/
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportGenerator.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleReportListener.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleResults.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/CheckstyleViolationCheckMojo.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/Locator.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/main/java/org/apache/maven/plugin/checkstyle/VelocityTemplate.java Mon Jul 24 03:33:41 2006
@@ -1,7 +1,7 @@
package org.apache.maven.plugin.checkstyle;
/*
- * Copyright 2004-2005 The Apache Software Foundation.
+ * Copyright 2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-checker-config.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-checker-config.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-checker-config.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-checker-config.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,46 @@
+ ------
+ Using a Custom Checkstyle Checker Configuration
+ ------
+ July 2006
+ ------
+
+
+Using a Custom Checkstyle Checker Configuration
+
+ A custom {{{http://checkstyle.sourceforge.net/config.html#Checker}Checker configuration xml file}} can
+ be defined and then referenced via a URL, File, or build classpath resource reference.
+
+ To reference a custom Checkstyle Checker configuration, use the <<configLocation>> parameter.
+
++-----+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>checkstyle.xml</configLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
+
+ This example causes the Maven 2 Checkstyle plugin to check for a File named <<checkstyle.xml>> or a
+ resource named <<checkstyle.xml>> within the compile scope of the dependencies or build extensions
+ classpath.
+
+ There are 4 predefined Checkstyle configuration definitions that ship with the Maven 2 Checkstyle Plugin,
+ the Sun Microsystems Definition is selected by default.
+
+ * <<config/sun_checks.xml>> - Sun Microsystems Definition (default).
+
+ * <<config/maven_checks.xml>> - Maven Development Definitions.
+
+ * <<config/turbine_checks.xml>> - Turbine Development Definitions.
+
+ * <<config/avalon_checks.xml>> - Avalon Development Definitions.
\ No newline at end of file
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-developed-checkstyle.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,83 @@
+ ------
+ Using Custom Developed Chechstyle Check Modules
+ ------
+ July 2006
+ ------
+
+
+Using Custom Developed Chechstyle Check Modules
+
+ For the really adventurous, custom Checkstyle checks can be used with the Maven 2 Checkstyle Plugin.
+
+ The plugin provides the ability to define the
+ {{{http://checkstyle.sourceforge.net/config.html#Packages}package names definition}} required to
+ reference your custom check modules.
+
+ TIP: Create a maven project that produces a jar file of your custom checks, and then include it in your
+ projects using the maven build extension in the pom.xml to avoid them being included in the compile or
+ package phases of your project.
+
+ Example: <<mycompany-checkstyle-checks-1.0.jar>>.
+
++-----+
+ $ jar -tvf mycompany-checkstyle-checks-1.0.jar
+ 0 Tue Nov 29 13:13:14 EST 2005 META-INF/
+ 401 Tue Nov 29 13:13:12 EST 2005 META-INF/MANIFEST.MF
+ 0 Tue Nov 29 13:13:12 EST 2005 META-INF/maven/
+ 0 Tue Nov 29 13:13:14 EST 2005 META-INF/maven/com.mycompany/
+ 0 Tue Nov 29 13:13:14 EST 2005 META-INF/maven/com.mycompany/mycompany-checkstyle-checks/
+ 8489 Tue Nov 29 13:13:14 EST 2005 META-INF/maven/com.mycompany/mycompany-checkstyle-checks/pom.xml
+ 151 Tue Nov 29 13:13:14 EST 2005 META-INF/maven/com.mycompany/mycompany-checkstyle-checks/pom.properties
+ 0 Tue Nov 29 13:13:14 EST 2005 com/
+ 0 Tue Nov 29 13:13:14 EST 2005 com/mycompany/
+ 0 Tue Nov 29 13:13:14 EST 2005 com/mycompany/checkstyle/
+ 1252 Tue Nov 29 13:13:14 EST 2005 com/mycompany/checkstyle/packagenames.xml
+ 12939 Tue Nov 29 13:13:14 EST 2005 com/mycompany/checkstyle/PurityCheck.class
++-----+
+
+ Example: <<checkstyle.xml>>
+
++-----+
+<?xml version="1.0" ?>
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+ <module name="TreeWalker">
+ <module name="PurityTest"/>
+ </module>
+</module>
++-----+
+
+
+ Example: <<pom.xml>>
+
++-----+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>checkstyle.xml</configLocation>
+ <packageNamesLocation>com/mycompany/checkstyle/packagenames.xml</packageNamesLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+ <build>
+ <extensions>
+ <extension>
+ <groupId>com.mycompany</groupId>
+ <artifactId>mycompany-checkstyle-checks</artifactId>
+ <version>1.0</version>
+ </extension>
+ </extensions>
+ </build>
+</project>
++-----+
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-property-expansion.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-property-expansion.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-property-expansion.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/custom-property-expansion.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,61 @@
+ ------
+ Using Custom Checkstyle Property Expansion Definitions
+ ------
+ July 2006
+ ------
+
+
+Using Custom Checkstyle Property Expansion Definitions
+
+ A custom {{{http://checkstyle.sourceforge.net/config.html#Properties}property expansion definitions}}
+ for the Checker can be defined.
+
+ Checkstyle uses the property expansion mechanism to allow injection of specific values into a pre-defined
+ Checker configuration. Using property expansion alone is an insufficient means to customize the checks
+ performed by Checkstyle.
+
+ Example: <<checkstyle.xml>> - only checks the package name in use to ensure that it conforms to the
+ desired scheme, but allows for users of this Checker to specify their own projectname.
+
++-----+
+<?xml version="1.0" ?>
+
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+ <module name="TreeWalker">
+ <module name="PackageName">
+ <property name="format"
+ value="com\.example\.${projectname}(\.[a-z][a-zA-Z0-9]+)*$"/>
+ </module>
+ </module>
+</module>
++-----+
+
+ Example: <<pom.xml>> - Specifies the <<projectname>> property expansion that Checkstyle will use when
+ encountering such a variable in the above Checker configuration.
+
++-----+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>checkstyle.xml</configLocation>
+ <propertyExpansion>projectname=whizbang</propertyExpansion>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
+
+ The property expansion information can also come from a location using the <<propertiesLocation>>
+ parameter, which can point to a URL, File, or build classpath resource reference.
+
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/multi-module-config.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/multi-module-config.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/multi-module-config.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/multi-module-config.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,109 @@
+ ------
+ Multimodule Configuration
+ ------
+ July 2006
+ ------
+
+
+Multimodule Configuration
+
+ Configuring the Checkstyle plugin for use within large multimodule projects can be done, but will require a little setup.
+
+ Example will use a mysterious project called 'whizbang'.
+
++-----+
+[whizbang]$ ls
+drwxr-xr-x+ 5 0 Nov 3 15:36 core/
+drwxr-xr-x+ 6 0 Nov 16 16:11 gui/
+drwxr-xr-x+ 6 0 Nov 29 13:13 jmx/
+-rw-r--r-- 1 6153 Nov 29 13:08 pom.xml
+drwxr-xr-x+ 4 0 Nov 1 15:48 src/
++-----+
+
+ First: setup a sub project to house your build tools.
+
++-----+
+[whizbang]$ ls
+drwxr-xr-x+ 4 0 Nov 29 13:44 build-tools/
+drwxr-xr-x+ 5 0 Nov 3 15:36 core/
+drwxr-xr-x+ 6 0 Nov 16 16:11 gui/
+drwxr-xr-x+ 6 0 Nov 29 13:13 jmx/
+-rw-r--r-- 1 6153 Nov 29 13:08 pom.xml
+drwxr-xr-x+ 4 0 Nov 1 15:48 src/
++-----+
+
+ Next, include the resources you want in the build-tools jar file.
+
++-----+
+[whizbang/build-tools]$ find . -type f
+./pom.xml
+./src/main/resources/whizbang/checkstyle.xml
+./src/main/resources/whizbang/pmd.xml
+./src/main/resources/whizbang/LICENSE.txt
++-----+
+
+ TIP: put the resources into a subdirectory that you can ensure will be unique, and not conflict with anyone else.
+
+ Now, include the checkstyle configuration in the top level pom.xml
+
++-----+
+[whizbang]$ cat pom.xml
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.example.whizbang</groupId>
+ <artifactId>whizbang-parent</artifactId>
+ <version>1.0</version>
+ <packaging>pom</packaging>
+ <name>WhizBang Parent</name>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>whizbang/checkstyle.xml</configLocation>
+ <headerLocation>whizbang/LICENSE.txt</headerLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <dependencies>
+ <dependency>
+ <groupId>com.example.whizbang</groupId>
+ <artifactId>build-tools</artifactId>
+ <version>1.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <modules>
+ <module>build-tools</module>
+ <module>core</module>
+ <module>jmx</module>
+ <module>gui</module>
+ </modules>
+</project>
++-----+
+
+ Once you are done with that, ensure that you do not include the maven-checkstyle-plugin in your sub modules, as their definition and configuration, will override the top level parent pom's definition.
+
+ Lastly, kick off a build of the site.
+
++-----+
+[whizbang]$ mvn site
++-----+
+
+ Every sub project will use the same checkstyle setup and configuration.
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/suppressions-filter.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/suppressions-filter.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/suppressions-filter.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/examples/suppressions-filter.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,52 @@
+ ------
+ Using a Suppressions Filter
+ ------
+ July 2006
+ ------
+
+
+Using a Suppressions Filter
+
+ Checkstyle allows the definition of a list of files and their line ranges that should be suppressed
+ from reporting any violations (known as a
+ {{{http://checkstyle.sourceforge.net/config.html#Filters}supressions filter}} ).
+
+ Example: <<checkstyle-suppressions.xml>>
+
++-----+
+<?xml version="1.0"?>
+
+<!DOCTYPE suppressions PUBLIC
+ "-//Puppy Crawl//DTD Suppressions 1.0//EN"
+ "http://www.puppycrawl.com/dtds/suppressions_1_0.dtd">
+
+<suppressions>
+ <suppress checks="JavadocStyleCheck"
+ files="GeneratedObject.java"
+ lines="50-9999"/>
+ <suppress checks="MagicNumberCheck"
+ files="LegacyDatasetConvertor.java"
+ lines="221,250-295"/>
+</suppressions>
++-----+
+
+ Example: <<pom.xml>> - Specifies the suppressions filter that Checkstyle should use.
+
++-----+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>checkstyle.xml</configLocation>
+ <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/index.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/index.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/index.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,50 @@
+ ------
+ Introduction
+ ------
+ Maria Odea Ching
+ ------
+ 20 July 2006
+ ------
+
+
+Maven 2 Checkstyle Plugin
+
+ The Checkstyle plugin generates report regarding the code style of the developer. For more information about checkstyle,
+ see {{{http://checkstyle.sourceforge.net/}http://checkstyle.sourceforge.net/}}
+
+ The plugin can be configured in the project's pom. Predefined rulesets are included with the plugin, these are:
+ sun_checks.xml, turbine_checks.xml, avalon_checks.xml and maven_checks.xml. You can also use a custom ruleset by
+ specifying it in the plugin configuration.
+
+* Goals Overview
+
+ The Checkstyle Plugin has two goals:
+
+ * {{{checkstyle-mojo.html}checkstyle:checkstyle}} performs checkstyle analysis and generates a report on violations
+ found.
+
+ * {{{check-mojo.html}checkstyle:check}} performs a violation check against the output checkstyle report to see if there
+ are any violations. Checkstyle analysis is automatically executed first before this mojo.
+
+* Usage
+
+ Instructions on how to use the Checkstyle Plugin can be found {{{usage.html}here}}.
+
+* Examples
+
+ The following examples show how to use the Checkstyle Plugin in more advanced usecases:
+
+ * {{{examples/custom-checker-config.html}Using a Custom Checkstyle Checker Configuration}}
+
+ * {{{examples/custom-property-expansion.html}Using Custom Checkstyle Property Expansion Definitions}}
+
+ * {{{examples/suppressions-filter.html}Using a Suppressions Filter}}
+
+ * {{{examples/custom-developed-checkstyle.html}Using Custom Developed Chechstyle Check Modules}}
+
+ * {{{examples/multi-module-config.html}Multimodule Configuration}}
+
+
+
+
+
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt Mon Jul 24 03:33:41 2006
@@ -0,0 +1,33 @@
+ ------
+ Usage
+ ------
+ Maria Odea Ching
+ ------
+ 21 July 2006
+ ------
+
+
+Usage
+
+ To generate the checkstyle report, add the checkstyle plugin in the \<reporting\> section of your project pom.
+
++-----+
+<project>
+ ...
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+ ...
+</project>
++-----+
+
+ Then, execute the site plugin to generate the report distribution.
+
++-----+
+ mvn site
++-----+
Added: maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/faq.fml?rev=424998&view=auto
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/faq.fml (added)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/fml/faq.fml Mon Jul 24 03:33:41 2006
@@ -0,0 +1,15 @@
+<?xml version="1.0"?>
+<faqs id="FAQ" title="Frequently Asked Questions">
+ <part id="General">
+ <faq id="How are the checkstyle.properties set">
+ <question>How are the checkstyle.properties set?</question>
+ <answer>
+ <p>
+ You can set the checkstyle.properties in the plugin configuration in your pom through the configLocation
+ parameter. If the parameter is not specified, the plugin uses a default .xml file, which is the sun_checks.xml,
+ that is bundled with the plugin.
+ </p>
+ </answer>
+ </faq>
+ </part>
+</faqs>
\ No newline at end of file
Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/site.xml?rev=424998&r1=424997&r2=424998&view=diff
==============================================================================
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/site.xml Mon Jul 24 03:33:41 2006
@@ -1,3 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+
<project name="Maven Checkstyle plugin">
<bannerLeft>
<name>Maven Checkstyle plugin</name>
@@ -12,11 +32,19 @@
<item name="Maven 2" href="http://maven.apache.org/maven2/"/>
</links>
- <menu name="Checkstyle Quickstart">
- <item name="Overview" href="howto.html"/>
- <item name="Customization" href="customize.html"/>
- <item name="Tips" href="tips.html"/>
- <item name="Sample Checkstyle Report" href="sample-checkstyle.html"/>
+ <menu name="Overview">
+ <item name="Introduction" href="index.html"/>
+ <item name="Usage" href="usage.html"/>
+ <item name="Goals" href="plugin-info.html"/>
+ <item name="FAQ" href="faq.html"/>
+ </menu>
+
+ <menu name="Examples">
+ <item name="Using a Custom Checkstyle Checker Configuration" href="/examples/custom-checker-config.html"/>
+ <item name="Using Custom Checkstyle Property Expansion Definitions" href="/examples/custom-property-expansion.html"/>
+ <item name="Using a Suppressions Filter" href="/examples/suppressions-filter.html"/>
+ <item name="Using Custom Developed Chechstyle Check Modules" href="/examples/custom-developed-checkstyle.html"/>
+ <item name="Multimodule Configuration" href="/examples/multi-module-config.html"/>
</menu>
${reports}
</body>