You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2003/05/30 15:13:27 UTC

cvs commit: maven/src/plugins-build/checkstyle/src/plugin-resources avalon_checks.xml sun_checks.xml turbine_checks.xml avalon-checkstyle.properties sun-checkstyle.properties turbine-checkstyle.properties

vmassol     2003/05/30 06:13:26

  Modified:    src/plugins-build/checkstyle .cvsignore plugin.jelly
                        plugin.properties project.xml
               src/plugins-build/checkstyle/xdocs changes.xml goals.xml
                        index.xml properties.xml
  Added:       src/plugins-build/checkstyle/src/plugin-resources
                        avalon_checks.xml sun_checks.xml turbine_checks.xml
  Removed:     src/plugins-build/checkstyle/xdocs .cvsignore
               src/plugins-build/checkstyle/src/plugin-resources
                        avalon-checkstyle.properties
                        sun-checkstyle.properties
                        turbine-checkstyle.properties
  Log:
  - Upgraded to support Checkstyle 3.1 and bumped version to 2.0-SNAPSHOT
  - Cleaned the plugin goals and logic
  - Cleaned and updated the documentation
  
  Revision  Changes    Path
  1.3       +1 -0      maven/src/plugins-build/checkstyle/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/.cvsignore,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- .cvsignore	28 May 2003 09:07:15 -0000	1.2
  +++ .cvsignore	30 May 2003 13:13:25 -0000	1.3
  @@ -3,3 +3,4 @@
   maven.log
   .classpath
   .project
  +build.properties
  
  
  
  1.6       +138 -94   maven/src/plugins-build/checkstyle/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/plugin.jelly,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- plugin.jelly	26 Mar 2003 23:27:44 -0000	1.5
  +++ plugin.jelly	30 May 2003 13:13:25 -0000	1.6
  @@ -1,45 +1,118 @@
   <?xml version="1.0"?>
   
  +<!--
  +  =============================================================================
  +    Checkstyle plugin for Maven.
  +  =============================================================================
  +-->
   <project
     xmlns:j="jelly:core"
     xmlns:ant="jelly:ant"
     xmlns:util="jelly:util"
     xmlns:doc="doc">
   
  -  <goal name="maven-checkstyle-plugin:register">
  -    <doc:registerReport 
  -      name="Checkstyle" 
  -      pluginName="maven-checkstyle-plugin"
  -      link="checkstyle-report"
  -      description="Report on coding style conventions."/>
  -  </goal>
  -  
  -  <goal name="maven-checkstyle-plugin:deregister">
  -    <doc:deregisterReport name="Checkstyle"/>
  -  </goal>
  -
  -  <!-- ================================================================== -->
  -  <!-- C H E C K S T Y L E                                                -->
  -  <!-- ================================================================== -->
  -
  -  <goal
  -    name="maven-checkstyle-plugin:report"
  -    description="Generate code convention conformance reports"
  -    prereqs="checkstyle:check-license-file"/>
  -
  -  <goal
  -    name="checkstyle:report">
  +  <!--
  +     ========================================================================
  +       Default goal.
  +     ========================================================================
  +  -->
  +  <goal name="checkstyle" description="Perform checkstyle checks"
  +      prereqs="checkstyle:report"/>
  +
  +  <!--
  +     ========================================================================
  +       Initializations.
  +     ========================================================================
  +  -->
  +  <goal name="checkstyle:init">
   
       <j:if test="${sourcesPresent == 'true'}">
   
  -      <ant:taskdef
  -        name="checkstyle"
  +      <!-- If an explicit config file is set then use that. If one isn't 
  +      	   then we will look for the maven.checkstyle.format property and
  +      	   load the predefined config set. -->
  +      <j:set var="checkstylePropertiesX" value="${maven.checkstyle.properties}X"/>
  +      <j:choose>
  +        <j:when test="${checkstylePropertiesX != 'X'}">
  +          <j:set 
  +            var="checkstyleProperties" 
  +            value="${maven.checkstyle.properties}"/>
  +        </j:when>
  +        <j:otherwise>
  +          <j:set 
  +            var="checkstyleProperties" 
  +            value="${plugin.resources}/${maven.checkstyle.format}_checks.xml"/>
  +        </j:otherwise>
  +      </j:choose>
  +
  +      <ant:taskdef name="checkstyle"
           classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
  +        <classpath>
  +          <pathelement location="${plugin.getDependencyPath('checkstyle:checkstyle')}"/>
  +          <pathelement location="${plugin.getDependencyPath('antlr:antlr')}"/>
  +          <pathelement location="${plugin.getDependencyPath('regexp:regexp')}"/>
  +          <pathelement location="${plugin.getDependencyPath('commons-beanutils:commons-beanutils')}"/>
  +          <pathelement location="${plugin.getDependencyPath('commons-collections:commons-collections')}"/>
  +          <pathelement location="${plugin.getDependencyPath('commons-logging:commons-logging')}"/>
  +        </classpath>
         </ant:taskdef>
   
  -      <attainGoal name="checkstyle:determine-properties" />
  +    </j:if>
  +
  +  </goal>
   
  -      <!-- Create the directory for the checkstyle cache in case it doesn't exist already -->
  +  <!--
  +     ========================================================================
  +       Check if license file is available, display warning if not and sets
  +       the Ant "checkstyleShouldRun" property if the license file is 
  +       available.
  +     ========================================================================
  +  -->
  +  <goal name="checkstyle:license"
  +    prereqs="checkstyle:init">
  +
  +    <j:if test="${sourcesPresent == 'true'}">
  +
  +      <util:file var="header" name="${maven.checkstyle.header.file}"/>
  +      
  +      <j:choose>
  +        <j:when test="${not(header.exists())}">
  +          <ant:echo>
  +            ======================================================================
  +            =                             W A R N I N G                          =
  +            ======================================================================
  +            =  Your project doesn't contain a header file specified as:          =
  +            =  ${header}
  +            =  Checkstyle needs it to check the existence of the License in your =
  +            =  source files. If it can't find this file, it throws an error.     =
  +            =  A temporary solution is to create an empty LICENSE.txt file.      =
  +            =  Though, we recommend that you edit this License.                  =
  +            ======================================================================
  +          </ant:echo>
  +        </j:when>
  +        <j:otherwise>
  +          <ant:property name="checkstyleShouldRun" value="true"/>
  +        </j:otherwise>
  +      </j:choose>
  +
  +    </j:if>
  +
  +  </goal>
  +
  +  <!--
  +     ========================================================================
  +       Generate a checkstyle report by running checkstyle on the project
  +       source code.
  +     ========================================================================
  +  -->
  +  <goal name="checkstyle:report"
  +    description="Perform checkstyle checks"
  +    prereqs="checkstyle:init,checkstyle:license">
  +
  +    <j:if test="${checkstyleShouldRun}">
  +
  +      <!-- Create the directory for the checkstyle cache in case it doesn't 
  +      	   exist already -->
         <ant:dirname property="maven.checkstyle.cache.dir" 
           file="${maven.checkstyle.cache.file}"/>
         <ant:mkdir dir="${maven.checkstyle.cache.dir}"/>
  @@ -47,14 +120,22 @@
         <ant:echo>Using ${checkstyleProperties} for checkstyle ...</ant:echo>
   
         <ant:checkstyle
  -        properties="${checkstyleProperties}"
  -        failOnViolation="${maven.checkstyle.fail.on.violation}"
  -        cacheFile="${maven.checkstyle.cache.file}">
  -        <ant:fileset 
  -          dir="${pom.build.sourceDirectory}"
  -          includes="${maven.checkstyle.includes}"
  -          excludes="${maven.checkstyle.excludes}"/>
  -        <ant:formatter type="xml" toFile="${maven.build.dir}/checkstyle-raw-report.xml"/>
  +        config="${checkstyleProperties}"
  +        failOnViolation="${maven.checkstyle.fail.on.violation}">
  +
  +        <property key="checkstyle.header.file" 
  +          file="${maven.checkstyle.header.file}"/>
  +        <property key="checkstyle.cache.file" 
  +          file="${maven.checkstyle.cache.file}"/>
  +
  +        <ant:fileset dir="${pom.build.sourceDirectory}">
  +          <ant:include name="${maven.checkstyle.includes}"/>
  +          <ant:include name="${maven.checkstyle.excludes}"/>
  +        </ant:fileset>
  +
  +        <ant:formatter type="xml" 
  +          toFile="${maven.build.dir}/checkstyle-raw-report.xml"/>
  +
           <j:choose>
             <j:when test="${maven.checkstyle.usefile}">
               <ant:formatter type="plain" 
  @@ -64,6 +145,7 @@
               <ant:formatter type="plain"/>
             </j:otherwise>
           </j:choose>
  +
         </ant:checkstyle>
         
         <doc:jsl
  @@ -72,70 +154,32 @@
           stylesheet="${plugin.resources}/checkstyle.jsl"
           omitXmlDeclaration="true"
           outputMode="xml"
  -        prettyPrint="true"
  -        />
  +        prettyPrint="true"/>
   
       </j:if>
   
     </goal>
   
  -  <goal name="checkstyle:check-license-file"
  -    description="Checks the existence of the LICENSE.txt file">
  -
  -    <attainGoal name="checkstyle:determine-properties" />
  -    
  -    <j:scope>
  -      <ant:property file="${checkstyleProperties}" />
  -      <j:set var="headerFile" scope="parent">${checkstyle.header.file}</j:set>
  -    </j:scope>
  -
  -    <util:file name="${headerFile}" var="header"/>
  -      
  -    <j:choose>
  -      <j:when test="${not(header.exists()) and not(empty(headerFile))}">
  -        <ant:echo>
  -          ======================================================================
  -          =                             W A R N I N G                          =
  -          ======================================================================
  -          =  Your project doesn't contain a header file specified as:          =
  -          =  ${header}
  -          =  Checkstyle needs it to check the existence of the License in your =
  -          =  source files. If it can't find this file, it throws an error.     =
  -          =  A temporary solution is to create an empty LICENSE.txt file.      =
  -          =  Though, we recommend that you edit this License.                  =
  -          ======================================================================
  -        </ant:echo>
  -      </j:when>
  -      <j:otherwise>
  -        <attainGoal name="checkstyle:report"/>        
  -      </j:otherwise>
  -    </j:choose>
  -
  +  <!--
  +     ========================================================================
  +       Register a Checkstyle report to the "site" plugin.
  +     ========================================================================
  +  -->
  +  <goal name="maven-checkstyle-plugin:register">
  +    <doc:registerReport 
  +      name="Checkstyle" 
  +      pluginName="checkstyle"
  +      link="checkstyle-report"
  +      description="Report on coding style conventions."/>
     </goal>
  -
  -  <goal name="checkstyle:determine-properties">
  -      <!--
  -       |
  -       | If an explicit properties file is set then use that. If one isn't then
  -       | we will look for the maven.checkstyle.type property as there aren't going
  -       | to be that many different formats: gnu, turbine, sun.
  -       |
  -      -->
  -
  -      <j:set var="checkstylePropertiesX" value="${maven.checkstyle.properties}X"/>
  -
  -      <j:choose>
  -        <j:when test="${checkstylePropertiesX != 'X'}">
  -          <j:set 
  -            var="checkstyleProperties" 
  -            value="${maven.checkstyle.properties}"/>
  -        </j:when>
  -        <j:otherwise>
  -          <j:set 
  -            var="checkstyleProperties" 
  -            value="${plugin.resources}/${maven.checkstyle.format}-checkstyle.properties"/>
  -        </j:otherwise>
  -      </j:choose>
  -
  +  
  +  <!--
  +     ========================================================================
  +       Deregister a Checkstyle report to the "site" plugin.
  +     ========================================================================
  +  -->
  +  <goal name="maven-checkstyle-plugin:deregister">
  +    <doc:deregisterReport name="Checkstyle"/>
     </goal>
  +
   </project>
  
  
  
  1.2       +2 -2      maven/src/plugins-build/checkstyle/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties	24 Jan 2003 03:44:58 -0000	1.1
  +++ plugin.properties	30 May 2003 13:13:25 -0000	1.2
  @@ -1,15 +1,15 @@
   # -------------------------------------------------------------------
  -# P L U G I N  P R O P E R I E S
  +# P L U G I N  P R O P E R T I E S
   # -------------------------------------------------------------------
   # Checkstyle plugin
   # -------------------------------------------------------------------
   
  -maven.build.dir = ${basedir}/target
   maven.checkstyle.includes = **/*.java
   maven.checkstyle.excludes = 
   maven.checkstyle.fail.on.violation = false
   maven.checkstyle.cache.file = ${maven.build.dir}/checkstyle-cachefile
   maven.checkstyle.format = sun
  +maven.checkstyle.header.file = ${basedir}/LICENSE.txt
   
   # If useFile is false then the checkstyle task will display violations
   # on stdout.
  
  
  
  1.13      +38 -60    maven/src/plugins-build/checkstyle/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/project.xml,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- project.xml	30 May 2003 09:19:21 -0000	1.12
  +++ project.xml	30 May 2003 13:13:25 -0000	1.13
  @@ -5,22 +5,29 @@
     <pomVersion>3</pomVersion>
     <id>maven-checkstyle-plugin</id>
     <name>Maven Checkstyle Plug-in</name>
  -  <currentVersion>1.1</currentVersion>
  +  <currentVersion>2.0-SNAPSHOT</currentVersion>
     <description/>
  -  <shortDescription>Java Project Management Tools</shortDescription>
  +  <shortDescription>Checkstyle Plug-in</shortDescription>
     <url>http://maven.apache.org/reference/plugins/checkstyle/</url>
     <siteDirectory>/www/maven.apache.org/reference/plugins/checkstyle/</siteDirectory>
     <repository>
       <connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/checkstyle/</connection>
       <url>http://cvs.apache.org/viewcvs/maven/src/plugins-build/checkstyle/</url>
     </repository>
  +
     <versions>
       <version>
         <id>1.1</id>
         <name>1.1</name>
         <tag>MAVEN_CHECKSTYLE_1_1</tag>
       </version>
  +    <version>
  +      <id>2.0</id>
  +      <name>2.0</name>
  +      <tag>HEAD</tag>
  +    </version>
     </versions>
  +
     <developers>
       <developer>
         <name>dIon Gillard</name>
  @@ -43,8 +50,8 @@
       <developer>
         <name>Vincent Massol</name>
         <id>vmassol</id>
  -      <email>vmassol@octo.com</email>
  -      <organization>Octo Technology</organization>
  +      <email>vmassol@pivolis.com</email>
  +      <organization>Pivolis</organization>
         <roles>
           <role>Java Developer</role>
         </roles>
  @@ -55,71 +62,42 @@
         <email>jason@zenplex.com</email>
         <organization>Zenplex</organization>
         <roles>
  -        <role>Architect</role>
  -        <role>Release Manager</role>
  +        <role>Java Developer</role>
         </roles>
       </developer>
     </developers>
  +
     <dependencies>
       <dependency>
  -      <id>antlr</id>
  -      <version>2.7.1</version>
  -      <jar>antlrall-2.7.1.jar</jar>
  -      <properties>
  -        <classloader>root</classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <id>checkstyle</id>
  -      <version>2.3</version>
  -      <properties>
  -        <classloader>root</classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>commons-jelly</groupId>
  -      <artifactId>commons-jelly-tags-jsl</artifactId>
  -      <version>20030211.143151</version>
  -      <properties>
  -        <classloader>root.maven</classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>commons-jelly</groupId>
  -      <artifactId>commons-jelly-tags-xml</artifactId>
  -      <version>20030211.142705</version>
  -      <url>http://jakarta.apache.org/commons/jelly/libs/xml/</url>
  -      <properties>
  -        <classloader>root.maven</classloader>
  -      </properties>
  -    </dependency>
  -    <dependency>
  -      <groupId>commons-jelly</groupId>
  -      <artifactId>commons-jelly-tags-util</artifactId>
  -      <version>20030211.141939</version>
  -      <url>http://jakarta.apache.org/commons/jelly/libs/util/</url>
  -      <properties>
  -        <classloader>root.maven</classloader>
  -      </properties>
  +      <groupId>antlr</groupId>
  +      <artifactId>antlr</artifactId>
  +      <version>2.7.2</version>
       </dependency>
       <dependency>
  -      <id>regexp</id>
  +      <groupId>checkstyle</groupId>
  +      <artifactId>checkstyle</artifactId>
  +      <version>3.1</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>regexp</groupId>
  +      <artifactId>regexp</artifactId>
         <version>1.2</version>
  -      <properties>
  -        <classloader>root</classloader>
  -      </properties>
  +    </dependency>
  +    <dependency>
  +      <groupId>commons-beanutils</groupId>
  +      <artifactId>commons-beanutils</artifactId>
  +      <version>1.6</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>commons-collections</groupId>
  +      <artifactId>commons-collections</artifactId>
  +      <version>2.1</version>
  +    </dependency>
  +    <dependency>
  +      <groupId>commons-logging</groupId>
  +      <artifactId>commons-logging</artifactId>
  +      <version>1.0.3</version>
       </dependency>
     </dependencies>
  -  <!-- Plugin properties -->
  -  <!--
  -  <properties>
  -    <buildDir>${basedir}/target</buildDir>
  -    <includes>**/*.java</includes>
  -    <excludes></excludes>
  -    <failOnViolation>false</failOnViolation>
  -    <cachefile>${maven.build.dir}/checkstyle-cachefile</cachefile>
  -    <format>sun</format>
  -  </properties>
  -  -->
   
   </project>
  
  
  
  1.3       +13 -0     maven/src/plugins-build/checkstyle/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/xdocs/changes.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- changes.xml	30 May 2003 09:19:21 -0000	1.2
  +++ changes.xml	30 May 2003 13:13:26 -0000	1.3
  @@ -6,6 +6,19 @@
     </properties>
   
     <body>
  +
  +    <release version="2.0" date="in CVS">
  +      <action dev="vmassol" type="update">
  +        Upgraded to Checkstyle 3.1.
  +      </action>
  +      <action dev="vmassol" type="update">
  +        Updated documentation.
  +      </action>
  +      <action dev="vmassol" type="update">
  +        Complete clean of the existing plugin.
  +      </action>
  +    </release>
  +    
       <release version="1.1" date="2003-05-30">
         <action dev="vmassol" type="add">
           Added a new <code>maven.checkstyle.useFile</code> property.
  
  
  
  1.2       +5 -15     maven/src/plugins-build/checkstyle/xdocs/goals.xml
  
  Index: goals.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/xdocs/goals.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- goals.xml	24 Jan 2003 03:44:59 -0000	1.1
  +++ goals.xml	30 May 2003 13:13:26 -0000	1.2
  @@ -13,27 +13,17 @@
           <tr>
             <td>checkstyle</td>
             <td>
  -            This is the default goal of the plugin and simply has a pre-requisite
  -            of the <code>checkstyle:check-license-file</code> goal.
  +            This is the default goal of the plugin. It simply calls the
  +            <code>checkstyle:report</code> goal.
             </td>
           </tr>
           <tr>
  -          <td>checkstyle:generate-report</td>
  +          <td>checkstyle:report</td>
             <td>
               Generates an xml report from the source code showing how well the
  -            code conforms to the <a href="http://checkstyle.sourceforge.net">Checkstyle</a>
  +            code conforms to the 
  +            <a href="http://checkstyle.sourceforge.net">Checkstyle</a>
               definitions defined by the project.
  -          </td>
  -        </tr>
  -        <tr>
  -          <td>checkstyle:check-license-file</td>
  -          <td>
  -            Checks the existence of the LICENSE.txt file that checkstyle uses
  -            for ensuring the top of a source file has a valid license block.
  -            <p>
  -              If the license file exists, the <code>checkstyle:generate-report</code>
  -              goal is attained.
  -            </p>
             </td>
           </tr>
         </table>
  
  
  
  1.2       +23 -1     maven/src/plugins-build/checkstyle/xdocs/index.xml
  
  Index: index.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/xdocs/index.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.xml	24 Jan 2003 03:44:59 -0000	1.1
  +++ index.xml	30 May 2003 13:13:26 -0000	1.2
  @@ -9,9 +9,31 @@
     <body>
       <section name="Maven CheckStyle Plugin">
         <p>
  -        This plugin generates a nicely formatted checkstyle report so
  +        This plugin generates a nicely formatted 
  +        <a href="http://checkstyle.sourceforge.net">Checkstyle</a> report so
           code violations can be easily found and corrected.
         </p>
  +    </section>
  +    <section name="News">
  +      <table>
  +        <tr>
  +          <th>Date</th>
  +          <th>Description</th>
  +        </tr>
  +        <tr>
  +          <td>30 May 2003</td>
  +          <td>
  +            New development version 2.0 created. First cut at supporting 
  +            Checkstyle 3.1.
  +          </td>
  +        </tr>
  +        <tr>
  +          <td>30 May 2003</td>
  +          <td>
  +            Release of version 1.1 (compatible with Checkstyle 2.4).
  +          </td>
  +        </tr>
  +      </table>
       </section>
    </body>
   </document>
  
  
  
  1.2       +22 -12    maven/src/plugins-build/checkstyle/xdocs/properties.xml
  
  Index: properties.xml
  ===================================================================
  RCS file: /home/cvs/maven/src/plugins-build/checkstyle/xdocs/properties.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- properties.xml	24 Jan 2003 03:44:59 -0000	1.1
  +++ properties.xml	30 May 2003 13:13:26 -0000	1.2
  @@ -34,22 +34,32 @@
             </td>
           </tr>
           <tr>
  +          <td>maven.checkstyle.format</td>
  +          <td>Yes</td>
  +          <td>
  +            Specifies what predefined check set to use. Available sets are
  +            "sun" (for the Sun coding conventions), "turbine" and "avalon".
  +            Default value is <code>sun</code>.
  +          </td>
  +        </tr>
  +        <tr>
             <td>maven.checkstyle.properties</td>
             <td>Yes</td>
             <td>
               Specifies the location of the checkstyle properties that will be
  -            used to check the source.
  -            <p>
  -              There is also a sample file shipped with maven of the Jakarta
  -              <a href="http://jakarta.apache.org/turbine/">Turbine</a> project
  -              coding style, which maven adheres to.
  -            </p>
  -            <p>For more information on checkstyle properties, please see the
  -            <a href="http://checkstyle.sourceforge.net">CheckStyle Home Page</a>
  -            </p>
  -            <p>The default value is
  -              <code>${plugin.dir}/core/sun-code-conventions-checkstyle.properties</code>.
  -            </p>
  +            used to check the source. Note that you will need to use this
  +            property only if you don't want to use any of the predefined
  +            formats (see <code>maven.checkstyle.format</code>).
  +          </td>
  +        </tr>
  +        <tr>
  +          <td>maven.checkstyle.header.file</td>
  +          <td>Yes</td>
  +          <td>
  +            Specifies the location of the License file (a.k.a the header file) 
  +            that is used by Checkstyle to verify that source code has the
  +            correct copyright. Default value is
  +            <code>${basedir}/LICENSE.txt</code>
             </td>
           </tr>
           <tr>
  
  
  
  1.1                  maven/src/plugins-build/checkstyle/src/plugin-resources/avalon_checks.xml
  
  Index: avalon_checks.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE module PUBLIC
      "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
      "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
  
  <!--
  
    Checkstyle configuration that checks the sun coding conventions from:
  
      - the Java Language Specification at
        http://java.sun.com/docs/books/jls/second_edition/html/index.html
  
      - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
  
      - the Javadoc guidelines at
        http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  
      - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  
      - some best practices
  
    Checkstyle is very configurable. Be sure to read the documentation at
    http://checkstyle.sf.net (or in your downloaded distribution).
  
    Most Checks are configurable, be sure to consult the documentation.
  
    To completely disable a check, just comment it out or delete it from the file.
  
    Finally, it is worth reading the documentation.
  
  -->
  
  <module name="Checker">
  
      <!-- Checks that a package.html file exists for each package.     -->
      <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
      <module name="PackageHtml"/>
  
      <!-- Checks whether files end with a new line.                        -->
      <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
      <module name="NewlineAtEndOfFile"/>
  
      <!-- Checks that property files contain the same keys.         -->
      <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
      <module name="Translation"/>
  
      <module name="TreeWalker">
  
          <property name="cacheFile" value="${checkstyle.cache.file}"/>
  
          <!-- ************************************************************** -->
          <!-- Checks that are different from the sun coding conventions ones -->
          <!-- ************************************************************** -->
          <property name="tabWidth" value="4"/>
          <module name="LeftCurly">
            <property name="option" value="nl"/>
          </module>
          <module name="RightCurly">
            <property name="option" value="alone"/>
          </module>
          <module name="MemberName">
            <property name="format" value="^m_[a-z](_?[a-zA-Z0-9])*$"/>
          </module>
          <module name="StaticVariableName">
            <property name="format" value="^c_[a-z](_?[a-zA-Z0-9])*$"/>
          </module>
          <module name="MethodName">
            <property name="format" value="[a-z](_?[a-zA-Z0-9]+)*$"/>
          </module>
          <module name="ParameterName">
            <property name="format" value="[a-z](_?[a-zA-Z0-9]+)*$"/>
          </module>
          <module name="LocalVariableName">
            <property name="format" value="[a-z](_?[a-zA-Z0-9]+)*$"/>
          </module>
          
          <!-- ************************************************************** -->
          <!-- Default Sun coding conventions checks                          -->
          <!-- ************************************************************** -->
  
          <!-- Checks for Javadoc comments.                     -->
          <!-- See http://checkstyle.sf.net/config_javadoc.html -->
          <module name="JavadocMethod"/>
          <module name="JavadocType"/>
          <module name="JavadocVariable"/>
  
  
          <!-- Checks for Naming Conventions.                  -->
          <!-- See http://checkstyle.sf.net/config_naming.html -->
          <module name="ConstantName"/>
          <module name="PackageName"/>
          <module name="TypeName"/>
          <module name="LocalFinalVariableName"/>
  
  
          <!-- Checks for Headers                              -->
          <!-- See http://checkstyle.sf.net/config_header.html -->
          <module name="Header">
              <!-- The follow property value demonstrates the ability     -->
              <!-- to have access to ANT properties. In this case it uses -->
              <!-- the ${basedir} property to allow Checkstyle to be run  -->
              <!-- from any directory within a project.                   -->
              <property name="headerFile" value="${checkstyle.header.file}"/>
          </module>
  
          <!-- Following interprets the header file as regular expressions. -->
          <!-- <module name="RegexpHeader"/>                                -->
  
  
          <!-- Checks for imports                              -->
          <!-- See http://checkstyle.sf.net/config_import.html -->
          <module name="AvoidStarImport"/>
          <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
          <module name="RedundantImport"/>
          <module name="UnusedImports"/>
  
  
          <!-- Checks for Size Violations.                    -->
          <!-- See http://checkstyle.sf.net/config_sizes.html -->
          <module name="FileLength"/>
          <module name="LineLength"/>
          <module name="MethodLength"/>
          <module name="ParameterNumber"/>
  
  
          <!-- Checks for whitespace                               -->
          <!-- See http://checkstyle.sf.net/config_whitespace.html -->
          <module name="EmptyForIteratorPad"/>
          <module name="NoWhitespaceAfter"/>
          <module name="NoWhitespaceBefore"/>
          <module name="OperatorWrap"/>
          <module name="ParenPad"/>
          <module name="TabCharacter"/>
          <module name="WhitespaceAfter"/>
          <module name="WhitespaceAround"/>
  
  
          <!-- Modifier Checks                                    -->
          <!-- See http://checkstyle.sf.net/config_modifiers.html -->
          <module name="ModifierOrder"/>
          <module name="RedundantModifier"/>
  
  
          <!-- Checks for blocks. You know, those {}'s         -->
          <!-- See http://checkstyle.sf.net/config_blocks.html -->
          <module name="AvoidNestedBlocks"/>
          <module name="EmptyBlock"/>
          
          <module name="NeedBraces"/>
  
  
          <!-- Checks for common coding problems               -->
          <!-- See http://checkstyle.sf.net/config_coding.html -->
          <module name="AvoidInlineConditionals"/>
          <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
          <module name="EmptyStatement"/>
          <module name="EqualsHashCode"/>
          <module name="HiddenField"/>
          <module name="IllegalInstantiation"/>
          <module name="InnerAssignment"/>
          <module name="MagicNumber"/>
          <module name="MissingSwitchDefault"/>
          <module name="RedundantThrows"/>
          <module name="SimplifyBooleanExpression"/>
          <module name="SimplifyBooleanReturn"/>
  
          <!-- Checks for class design                         -->
          <!-- See http://checkstyle.sf.net/config_design.html -->
          <module name="DesignForExtension"/>
          <module name="FinalClass"/>
          <module name="HideUtilityClassConstructor"/>
          <module name="InterfaceIsType"/>
          <module name="VisibilityModifier"/>
  
  
          <!-- Miscellaneous other checks.                   -->
          <!-- See http://checkstyle.sf.net/config_misc.html -->
          <module name="ArrayTypeStyle"/>
          <module name="FinalParameters"/>
          <module name="GenericIllegalRegexp">
              <property name="format" value="\s+$"/>
              <property name="message" value="Line has trailing spaces."/>
          </module>
          <module name="TodoComment"/>
          <module name="UpperEll"/>
  
      </module>
  
  </module>
  
  
  
  1.1                  maven/src/plugins-build/checkstyle/src/plugin-resources/sun_checks.xml
  
  Index: sun_checks.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE module PUBLIC
      "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
      "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
  
  <!--
  
    Checkstyle configuration that checks the sun coding conventions from:
  
      - the Java Language Specification at
        http://java.sun.com/docs/books/jls/second_edition/html/index.html
  
      - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
  
      - the Javadoc guidelines at
        http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  
      - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  
      - some best practices
  
    Checkstyle is very configurable. Be sure to read the documentation at
    http://checkstyle.sf.net (or in your downloaded distribution).
  
    Most Checks are configurable, be sure to consult the documentation.
  
    To completely disable a check, just comment it out or delete it from the file.
  
    Finally, it is worth reading the documentation.
  
  -->
  
  <module name="Checker">
  
      <!-- Checks that a package.html file exists for each package.     -->
      <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
      <module name="PackageHtml"/>
  
      <!-- Checks whether files end with a new line.                        -->
      <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
      <module name="NewlineAtEndOfFile"/>
  
      <!-- Checks that property files contain the same keys.         -->
      <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
      <module name="Translation"/>
  
  
      <module name="TreeWalker">
  
          <property name="cacheFile" value="${checkstyle.cache.file}"/>
  
          <!-- Checks for Javadoc comments.                     -->
          <!-- See http://checkstyle.sf.net/config_javadoc.html -->
          <module name="JavadocMethod"/>
          <module name="JavadocType"/>
          <module name="JavadocVariable"/>
  
  
          <!-- Checks for Naming Conventions.                  -->
          <!-- See http://checkstyle.sf.net/config_naming.html -->
          <module name="ConstantName"/>
          <module name="LocalFinalVariableName"/>
          <module name="LocalVariableName"/>
          <module name="MemberName"/>
          <module name="MethodName"/>
          <module name="PackageName"/>
          <module name="ParameterName"/>
          <module name="StaticVariableName"/>
          <module name="TypeName"/>
  
  
          <!-- Checks for Headers                              -->
          <!-- See http://checkstyle.sf.net/config_header.html -->
          <module name="Header">
              <!-- The follow property value demonstrates the ability     -->
              <!-- to have access to ANT properties. In this case it uses -->
              <!-- the ${basedir} property to allow Checkstyle to be run  -->
              <!-- from any directory within a project.                   -->
              <property name="headerFile" value="${checkstyle.header.file}"/>
          </module>
  
          <!-- Following interprets the header file as regular expressions. -->
          <!-- <module name="RegexpHeader"/>                                -->
  
  
          <!-- Checks for imports                              -->
          <!-- See http://checkstyle.sf.net/config_import.html -->
          <module name="AvoidStarImport"/>
          <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
          <module name="RedundantImport"/>
          <module name="UnusedImports"/>
  
  
          <!-- Checks for Size Violations.                    -->
          <!-- See http://checkstyle.sf.net/config_sizes.html -->
          <module name="FileLength"/>
          <module name="LineLength"/>
          <module name="MethodLength"/>
          <module name="ParameterNumber"/>
  
  
          <!-- Checks for whitespace                               -->
          <!-- See http://checkstyle.sf.net/config_whitespace.html -->
          <module name="EmptyForIteratorPad"/>
          <module name="NoWhitespaceAfter"/>
          <module name="NoWhitespaceBefore"/>
          <module name="OperatorWrap"/>
          <module name="ParenPad"/>
          <module name="TabCharacter"/>
          <module name="WhitespaceAfter"/>
          <module name="WhitespaceAround"/>
  
  
          <!-- Modifier Checks                                    -->
          <!-- See http://checkstyle.sf.net/config_modifiers.html -->
          <module name="ModifierOrder"/>
          <module name="RedundantModifier"/>
  
  
          <!-- Checks for blocks. You know, those {}'s         -->
          <!-- See http://checkstyle.sf.net/config_blocks.html -->
          <module name="AvoidNestedBlocks"/>
          <module name="EmptyBlock"/>
          <module name="LeftCurly"/>
          <module name="NeedBraces"/>
          <module name="RightCurly"/>
  
  
          <!-- Checks for common coding problems               -->
          <!-- See http://checkstyle.sf.net/config_coding.html -->
          <module name="AvoidInlineConditionals"/>
          <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
          <module name="EmptyStatement"/>
          <module name="EqualsHashCode"/>
          <module name="HiddenField"/>
          <module name="IllegalInstantiation"/>
          <module name="InnerAssignment"/>
          <module name="MagicNumber"/>
          <module name="MissingSwitchDefault"/>
          <module name="RedundantThrows"/>
          <module name="SimplifyBooleanExpression"/>
          <module name="SimplifyBooleanReturn"/>
  
          <!-- Checks for class design                         -->
          <!-- See http://checkstyle.sf.net/config_design.html -->
          <module name="DesignForExtension"/>
          <module name="FinalClass"/>
          <module name="HideUtilityClassConstructor"/>
          <module name="InterfaceIsType"/>
          <module name="VisibilityModifier"/>
  
  
          <!-- Miscellaneous other checks.                   -->
          <!-- See http://checkstyle.sf.net/config_misc.html -->
          <module name="ArrayTypeStyle"/>
          <module name="FinalParameters"/>
          <module name="GenericIllegalRegexp">
              <property name="format" value="\s+$"/>
              <property name="message" value="Line has trailing spaces."/>
          </module>
          <module name="TodoComment"/>
          <module name="UpperEll"/>
  
      </module>
  
  </module>
  
  
  
  1.1                  maven/src/plugins-build/checkstyle/src/plugin-resources/turbine_checks.xml
  
  Index: turbine_checks.xml
  ===================================================================
  <?xml version="1.0"?>
  <!DOCTYPE module PUBLIC
      "-//Puppy Crawl//DTD Check Configuration 1.1//EN"
      "http://www.puppycrawl.com/dtds/configuration_1_1.dtd">
  
  <!--
  
    Checkstyle configuration that checks the sun coding conventions from:
  
      - the Java Language Specification at
        http://java.sun.com/docs/books/jls/second_edition/html/index.html
  
      - the Sun Code Conventions at http://java.sun.com/docs/codeconv/
  
      - the Javadoc guidelines at
        http://java.sun.com/j2se/javadoc/writingdoccomments/index.html
  
      - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html
  
      - some best practices
  
    Checkstyle is very configurable. Be sure to read the documentation at
    http://checkstyle.sf.net (or in your downloaded distribution).
  
    Most Checks are configurable, be sure to consult the documentation.
  
    To completely disable a check, just comment it out or delete it from the file.
  
    Finally, it is worth reading the documentation.
  
  -->
  
  <module name="Checker">
  
      <!-- Checks that a package.html file exists for each package.     -->
      <!-- See http://checkstyle.sf.net/config_javadoc.html#PackageHtml -->
      <module name="PackageHtml"/>
  
      <!-- Checks whether files end with a new line.                        -->
      <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
      <module name="NewlineAtEndOfFile"/>
  
      <!-- Checks that property files contain the same keys.         -->
      <!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
      <module name="Translation"/>
  
      <module name="TreeWalker">
  
          <property name="cacheFile" value="${checkstyle.cache.file}"/>
  
          <!-- ************************************************************** -->
          <!-- Checks that are different from the sun coding conventions ones -->
          <!-- ************************************************************** -->
          <property name="tabWidth" value="4"/>
          <module name="LeftCurly">
            <property name="option" value="nl"/>
          </module>
          <module name="RightCurly">
            <property name="option" value="alone"/>
          </module>
          <module name="LineLength">
            <property name="ignorePattern" value="@version"/>
          </module>
          <module name="MemberName">
            <property name="format" value="^f[A-Z][a-zA-Z0-9]*$"/>
          </module>
          
          <!-- ************************************************************** -->
          <!-- Default Sun coding conventions checks                          -->
          <!-- ************************************************************** -->
  
          <!-- Checks for Javadoc comments.                     -->
          <!-- See http://checkstyle.sf.net/config_javadoc.html -->
          <module name="JavadocMethod"/>
          <module name="JavadocType"/>
          <module name="JavadocVariable"/>
  
  
          <!-- Checks for Naming Conventions.                  -->
          <!-- See http://checkstyle.sf.net/config_naming.html -->
          <module name="ConstantName"/>
          <module name="LocalFinalVariableName"/>
          <module name="LocalVariableName"/>
          <module name="MethodName"/>
          <module name="PackageName"/>
          <module name="ParameterName"/>
          <module name="StaticVariableName"/>
          <module name="TypeName"/>
  
  
          <!-- Checks for Headers                              -->
          <!-- See http://checkstyle.sf.net/config_header.html -->
          <module name="Header">
              <!-- The follow property value demonstrates the ability     -->
              <!-- to have access to ANT properties. In this case it uses -->
              <!-- the ${basedir} property to allow Checkstyle to be run  -->
              <!-- from any directory within a project.                   -->
              <property name="headerFile" value="${checkstyle.header.file}"/>
          </module>
  
          <!-- Following interprets the header file as regular expressions. -->
          <!-- <module name="RegexpHeader"/>                                -->
  
  
          <!-- Checks for imports                              -->
          <!-- See http://checkstyle.sf.net/config_import.html -->
          <module name="AvoidStarImport"/>
          <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
          <module name="RedundantImport"/>
          <module name="UnusedImports"/>
  
  
          <!-- Checks for Size Violations.                    -->
          <!-- See http://checkstyle.sf.net/config_sizes.html -->
          <module name="FileLength"/>
          <module name="MethodLength"/>
          <module name="ParameterNumber"/>
  
  
          <!-- Checks for whitespace                               -->
          <!-- See http://checkstyle.sf.net/config_whitespace.html -->
          <module name="EmptyForIteratorPad"/>
          <module name="NoWhitespaceAfter"/>
          <module name="NoWhitespaceBefore"/>
          <module name="OperatorWrap"/>
          <module name="ParenPad"/>
          <module name="TabCharacter"/>
          <module name="WhitespaceAfter"/>
          <module name="WhitespaceAround"/>
  
  
          <!-- Modifier Checks                                    -->
          <!-- See http://checkstyle.sf.net/config_modifiers.html -->
          <module name="ModifierOrder"/>
          <module name="RedundantModifier"/>
  
  
          <!-- Checks for blocks. You know, those {}'s         -->
          <!-- See http://checkstyle.sf.net/config_blocks.html -->
          <module name="AvoidNestedBlocks"/>
          <module name="EmptyBlock"/>
          
          <module name="NeedBraces"/>
  
  
          <!-- Checks for common coding problems               -->
          <!-- See http://checkstyle.sf.net/config_coding.html -->
          <module name="AvoidInlineConditionals"/>
          <module name="DoubleCheckedLocking"/>    <!-- MY FAVOURITE -->
          <module name="EmptyStatement"/>
          <module name="EqualsHashCode"/>
          <module name="HiddenField"/>
          <module name="IllegalInstantiation"/>
          <module name="InnerAssignment"/>
          <module name="MagicNumber"/>
          <module name="MissingSwitchDefault"/>
          <module name="RedundantThrows"/>
          <module name="SimplifyBooleanExpression"/>
          <module name="SimplifyBooleanReturn"/>
  
          <!-- Checks for class design                         -->
          <!-- See http://checkstyle.sf.net/config_design.html -->
          <module name="DesignForExtension"/>
          <module name="FinalClass"/>
          <module name="HideUtilityClassConstructor"/>
          <module name="InterfaceIsType"/>
          <module name="VisibilityModifier"/>
  
  
          <!-- Miscellaneous other checks.                   -->
          <!-- See http://checkstyle.sf.net/config_misc.html -->
          <module name="ArrayTypeStyle"/>
          <module name="FinalParameters"/>
          <module name="GenericIllegalRegexp">
              <property name="format" value="\s+$"/>
              <property name="message" value="Line has trailing spaces."/>
          </module>
          <module name="TodoComment"/>
          <module name="UpperEll"/>
  
      </module>
  
  </module>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org