kaz 02/04/29 07:22:52
Modified: src/templates/build build-maven.xml default.properties
xdocs build-file.xml properties.xml
Log:
Added two properties to control the files that are included and excluded
from the Checkstyle reporting. Updated all documentation to reflect the
new changes. This allows a user to exclude files that might have been
autogenerated (by JavaCC) from the report.
Revision Changes Path
1.39 +4 -1 jakarta-turbine-maven/src/templates/build/build-maven.xml
Index: build-maven.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-maven.xml,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- build-maven.xml 28 Apr 2002 15:36:58 -0000 1.38
+++ build-maven.xml 29 Apr 2002 14:22:52 -0000 1.39
@@ -306,7 +306,10 @@
ignoreBraces="${checkstyle.ignore.braces}"
failOnViolation="${checkstyle.fail.on.violation}"
cacheFile="${checkstyle.cache.file}" >
- <fileset dir="${src.dir}" includes="**/*.java"/>
+ <fileset
+ dir="${src.dir}"
+ includes="${checkstyle.includes}"
+ excludes="${checkstyle.excludes}"/>
<formatter type="xml" toFile="${build.dir}/checkstyle-raw-report.xml"/>
<formatter type="plain" toFile="${build.dir}/checkstyle-raw-report.txt"/>
</checkstyle>
1.27 +2 -0 jakarta-turbine-maven/src/templates/build/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/default.properties,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- default.properties 27 Apr 2002 14:10:47 -0000 1.26
+++ default.properties 29 Apr 2002 14:22:52 -0000 1.27
@@ -68,6 +68,8 @@
# Checkstyle settings ... default maven settings, these can be
# overridden in a project specific properties file.
##
+checkstyle.includes = **/*.java
+checkstyle.excludes =
checkstyle.lcurly.type = nl
checkstyle.lcurly.method = nl
checkstyle.lcurly.other = nl
1.30 +19 -13 jakarta-turbine-maven/xdocs/build-file.xml
Index: build-file.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/build-file.xml,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- build-file.xml 27 Apr 2002 13:56:42 -0000 1.29
+++ build-file.xml 29 Apr 2002 14:22:52 -0000 1.30
@@ -252,25 +252,31 @@
codebase.
</p>
<p>
- The source tree and coding conventions are specified
- via <a href="properties.html">properties</a> that can be
- overridden as documented in the <a
- href="integrate.html">Integration</a> document. In the
- future, the source tree will eventually be specified by the
- <a
href="project-descriptor.html#sourceDirectories"><code>sourceDirectories</code></a>
- element of the project descriptor (currently Checkstyle does
- not support the use of path references, only filesets).
+ The source tree is specified via the <code>${src.dir}</code>
+ property. By default, all files that match the Ant pattern
+ <code>**/*.java</code> are checked. This default can be
+ overridden via the <code>${checkstyle.includes}</code> and
+ <code>${checkstyle.excludes}</code> properties. In addition,
+ all of the coding conventions are specified via properties
+ should the need to be override the defaults arises. The
+ default coding conventions used by Maven correspond to the
+ <a
href="http://jakarta.apache.org/turbine/common/code-standards.html">Turbine-family</a>
+ coding conventions. For more information on the various
+ Checkstyle properties, please refer to the <a
+ href="properties.html#Checkstyle Settings">Properties</a>
+ document.
</p>
<p>
- Note: there is a Maven default that causes Checkstyle to look
- for a file called <code>LICENSE.txt</code> in the project's base
+ Note: By default, Maven directs Checkstyle to look for a file
+ called <code>LICENSE.txt</code> in the project's base
directory. Checkstyle will verify that this header file is
included at the top of each source file (see the <a
href="properties.html#Checkstyle Settings">Properties</a>
document for more information). As a result, a build failure
- will occur if the <code>LICENSE.txt</code> file cannot be located.
- To prevent this from occurring, either change the default, or
- simply create the file in your project's base directory.
+ will occur if the <code>LICENSE.txt</code> file cannot be
+ located. To prevent this from occurring, either change the
+ default, or simply create the file in your project's base
+ directory.
</p>
<p>
Also note: there is a known memory issue if the size of the
1.12 +23 -2 jakarta-turbine-maven/xdocs/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/properties.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- properties.xml 27 Apr 2002 14:10:47 -0000 1.11
+++ properties.xml 29 Apr 2002 14:22:52 -0000 1.12
@@ -411,6 +411,26 @@
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<tr>
+ <td>checkstyle.includes</td>
+ <td>Yes</td>
+ <td>
+ Specifies the Ant pattern to use when matching files in the
+ source tree to be included in the Checkstyle report. The
+ default value is <code>**/*.java</code>, which matches all
+ Java source files in the source tree (specified by the
+ <code>${src.dir}</code> property.
+ </td>
+ </tr>
+ <tr>
+ <td>checkstyle.excludes</td>
+ <td>Yes</td>
+ <td>
+ Specifies the Ant pattern to use when matching files in the
+ source tree to be excluded from the Checkstyle report. The
+ default value is to not exclude any files.
+ </td>
+ </tr>
+ <tr>
<td>checkstyle.lcurly.type</td>
<td>Yes</td>
<td>
@@ -1036,15 +1056,16 @@
The default value is <code>#f30</code> (red).
</td>
</tr>
+ <!--
<tr>
<td>ui.href.link.selfref</td>
<td>Yes</td>
<td>
Specifies the color used for all links that refer to
- themselves. Not all browsers currently support this
- feature. The default value is <code>#555</code> (gray).
+ themselves. The default value is <code>#555</code> (gray).
</td>
</tr>
+ -->
</table>
</section>
<section name="Miscellaneous Settings">