dion 2002/06/22 09:12:10
Modified: xdocs/ref properties.xml
src/templates/build/plugins/core default.properties
build.xml
Added: src/templates/build/plugins/core
turbine-checkstyle.properties
sun-code-conventions-checkstyle.properties
Log:
- Separate checkstyle properties away from maven properties.
- add turbine coding style and sun style properties files
- change build file to use properties file for checkstyle
- update docs to reflect less properties
Revision Changes Path
1.22 +15 -336 jakarta-turbine-maven/xdocs/ref/properties.xml
Index: properties.xml
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/xdocs/ref/properties.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- properties.xml 4 Jun 2002 20:11:23 -0000 1.21
+++ properties.xml 22 Jun 2002 16:12:09 -0000 1.22
@@ -578,345 +578,24 @@
</td>
</tr>
<tr>
- <td>maven.checkstyle.lcurly.type</td>
+ <td>maven.checkstyle.properties</td>
<td>Yes</td>
<td>
- Specifies the proper location of the left curly brace for
- type definitions.
- The possible values are: <code>ignore</code>,
- <code>eol</code> (end of line), <code>nl</code> (newline),
- and <code>nlow</code> (newline on wrap).
- The default value is <code>nl</code>.
+ 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>${maven.home}/plugins/core/sun-code-conventions-checkstyle.properties</code>.
+ </p>
</td>
- </tr>
- <tr>
- <td>maven.checkstyle.lcurly.method</td>
- <td>Yes</td>
- <td>
- Specifies the proper location of the left curly brace for
- method declarations.
- The possible values are: <code>ignore</code>,
- <code>eol</code> (end of line), <code>nl</code> (newline),
- and <code>nlow</code> (newline on wrap).
- The default value is <code>nl</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.lcurly.other</td>
- <td>Yes</td>
- <td>
- Specifies the proper location of the left curly brace for
- other declarations.
- The possible values are: <code>ignore</code>,
- <code>eol</code> (end of line), <code>nl</code> (newline),
- or <code>nlow</code> (newline on wrap).
- The default value is <code>nl</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.rcurly</td>
- <td>Yes</td>
- <td>
- Specifies the proper location of the right curly brace.
- The possible values are: <code>ignore</code>,
- <code>same</code> (on the same line), or
- <code>alone</code> (on its own line).
- The default value is <code>alone</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.paren.pad</td>
- <td>Yes</td>
- <td>
- Specifies the policy for padding parenthesises.
- The possible values are: <code>ignore</code> or
- <code>nospace</code>. The default value is
- <code>nospace</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.allow.tabs</td>
- <td>Yes</td>
- <td>
- Specifies whether or not tabs are permitted in source
- files.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.allow.protected</td>
- <td>Yes</td>
- <td>
- Specifies whether or not protected data are permitted in
- source files.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.allow.package</td>
- <td>Yes</td>
- <td>
- Specifies whether or not package visible data is
- permitted.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.allow.no.author</td>
- <td>Yes</td>
- <td>
- Specifies whether or not the <code>@author</code> tag must
- be defined for class and interface Javadoc comments.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.max.line.len</td>
- <td>Yes</td>
- <td>
- Specifies the maximum line length permitted.
- The default value is <code>80</code> characters.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.tab.width</td>
- <td>Yes</td>
- <td>
- The distance between tab stops, used in line number and
- column calculations. The default value is <code>8</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.line.len.pattern</td>
- <td>Yes</td>
- <td>
- Specifies a regular expression for lines to ignore in
- maximum line length checks. The default value is
- <code>^$"</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.max.method.len</td>
- <td>Yes</td>
- <td>
- Specifies the maximum length a method.
- The default value is <code>150</code> lines.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.max.constructor.len</td>
- <td>Yes</td>
- <td>
- Specifies the maximum length of a constructor.
- The default value is <code>150</code> lines.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.max.file.len</td>
- <td>Yes</td>
- <td>
- Specifies the maximum length of a file.
- The default value is <code>2000</code> lines.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.import.len</td>
- <td>Yes</td>
- <td>
- Specifies whether or not to ignore the maximum line length
- for import statements.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.member.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that member variables
- must match.
- The default value is <code>^[a-z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.public.member.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that public member
- variables must match.
- The default value is <code>^f[A-Z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.param.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that parameters must
- match.
- The default value is <code>^f[A-Z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.const.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that constants must
- match.
- The default value is <code>^[A-Z]([A-Z0-9_]*[A-Z0-9])?$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.static.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that static variables
- must match.
- The default value is <code>^[a-z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.type.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that type names must
- match.
- The default value is <code>^[A-Z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.method.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that method names must
- match.
- The default value is <code>^[a-z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.local.var.pattern</td>
- <td>Yes</td>
- <td>
- Specifies the regular expression that local variables must
- match.
- The default value is <code>^[a-z][a-zA-Z0-9]*$</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.header.file</td>
- <td>Yes</td>
- <td>
- Specifies a file that must be included at the top of each
- source file. If your source code typically contains the
- package declaration on the first line, then be sure to
- include a blank line at the top of your header file.
- Similarly, if you typically follow that package
- declaration with a blank line, be sure to add an
- additional blank line to top of the header file. This
- will enable Checkstyle to match each line of the header
- file with the source code to verify the source contains the
- proper header. You'll also want to instruct Checkstyle to
- ignore the first line (which is the package declaration)
- because it will be different in each file, see the next
- property for more information. The default value header
- file used is <code>LICENSE.txt</code>. This will enable a
- project to ensure its LICENSE is included at the top of
- each source file. To disable this feature, you'll have to
- set this value to point to an empty file in your project's
- base directory.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.header.ignore.line</td>
- <td>Yes</td>
- <td>
- Specifies a comma-separated list of line numbers to ignore
- when comparing the header file to a source file. This is
- useful in the event that some line in the header file will
- vary from source file to source file. The default value
- is <code>1,6</code>. These lines, when used with the
- Apache LICENSE file, are the top-most package declaration
- and the part of the LICENSE file that contains the year as
- each source file may have varying values for these lines.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.header.files.regexp</td>
- <td>Yes</td>
- <td>
- Specifies if each line in the header file should be
- treated as a regular expression. The default value is
- <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.javadoc.scope</td>
- <td>Yes</td>
- <td>
- Specifies the scope where Javadoc comments are inspected.
- The possible values are: <code>nothing</code>,
- <code>public</code>, <code>protected</code>,
- <code>private</code>, or <code>anoninner</code> (anonymous
- inner classes). The default value is
- <code>private</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.require.package.html</td>
- <td>Yes</td>
- <td>
- Specifies whether or not an HTML file is required for
- package-level Javadoc documentation. The default value is
- <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.imports</td>
- <td>Yes</td>
- <td>
- Specifies whether or not to ignore checking import
- statements. The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.illegal.imports</td>
- <td>Yes</td>
- <td>
- Comma separated list of package prefixes that are not
- allowed in import statements. The default is to allow all
- packages.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.whitespace</td>
- <td>Yes</td>
- <td>
- Specifies whether or not to ignore whitespace.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.cast.whitespace</td>
- <td>Yes</td>
- <td>
- Specifies whether or not to ignore whitespace after a
- cast. The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.braces</td>
- <td>Yes</td>
- <td>
- Specifies whether or not to ignore braces.
- The default value is <code>false</code>.
- </td>
- </tr>
- <tr>
- <td>maven.checkstyle.ignore.public.in.interface</td>
- <td>Yes</td>
- <td>
- Specifies whether to ignore the public keyword in interface
- definitions. The default value is <code>false</code>.
- </td>
- </tr>
+ </tr>
<tr>
<td>maven.checkstyle.fail.on.violation</td>
<td>Yes</td>
1.9 +1 -35
jakarta-turbine-maven/src/templates/build/plugins/core/default.properties
Index: default.properties
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/core/default.properties,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- default.properties 5 Jun 2002 00:50:24 -0000 1.8
+++ default.properties 22 Jun 2002 16:12:09 -0000 1.9
@@ -80,41 +80,7 @@
#
maven.checkstyle.includes = **/*.java
maven.checkstyle.excludes =
-maven.checkstyle.lcurly.type = nl
-maven.checkstyle.lcurly.method = nl
-maven.checkstyle.lcurly.other = nl
-maven.checkstyle.rcurly = alone
-maven.checkstyle.paren.pad = nospace
-maven.checkstyle.allow.tabs = false
-maven.checkstyle.allow.protected = false
-maven.checkstyle.allow.package = false
-maven.checkstyle.allow.no.author = false
-maven.checkstyle.max.line.len = 80
-maven.checkstyle.tab.width = 8
-maven.checkstyle.ignore.line.len.pattern = ^$
-maven.checkstyle.max.method.len = 150
-maven.checkstyle.max.constructor.len = 150
-maven.checkstyle.max.file.len = 2000
-maven.checkstyle.ignore.import.len = false
-maven.checkstyle.member.pattern = ^[a-z][a-zA-Z0-9]*$
-maven.checkstyle.public.member.pattern = ^f[A-Z][a-zA-Z0-9]*$
-maven.checkstyle.param.pattern = ^[a-z][a-zA-Z0-9]*$
-maven.checkstyle.const.pattern = ^[A-Z]([A-Z0-9_]*[A-Z0-9])?$
-maven.checkstyle.static.pattern = ^[a-z][a-zA-Z0-9]*$
-maven.checkstyle.type.pattern = ^[A-Z][a-zA-Z0-9]*$
-maven.checkstyle.method.pattern = ^[a-z][a-zA-Z0-9]*$
-maven.checkstyle.local.var.pattern = ^[a-z][a-zA-Z0-9]*$
-maven.checkstyle.header.file = LICENSE.txt
-maven.checkstyle.header.lines.regexp = false
-maven.checkstyle.header.ignore.line = 1,6
-maven.checkstyle.javadoc.scope = private
-maven.checkstyle.require.package.html = false
-maven.checkstyle.ignore.imports = false
-maven.checkstyle.illegal.imports =
-maven.checkstyle.ignore.whitespace = false
-maven.checkstyle.ignore.cast.whitespace = false
-maven.checkstyle.ignore.braces = false
-maven.checkstyle.ignore.public.in.interface = false
+maven.checkstyle.properties =
${maven.home}/plugins/core/turbine-checkstyle.properties
maven.checkstyle.fail.on.violation = false
maven.checkstyle.cache.file = ${maven.build.dir}/checkstyle-cachefile
1.19 +1 -35 jakarta-turbine-maven/src/templates/build/plugins/core/build.xml
Index: build.xml
===================================================================
RCS file:
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/core/build.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- build.xml 16 Jun 2002 17:06:22 -0000 1.18
+++ build.xml 22 Jun 2002 16:12:10 -0000 1.19
@@ -725,41 +725,7 @@
<target name="do-check-source" if="maven.sourcesPresent">
<checkstyle
- lcurlyType="${maven.checkstyle.lcurly.type}"
- lcurlyMethod="${maven.checkstyle.lcurly.method}"
- lcurlyOther="${maven.checkstyle.lcurly.other}"
- rcurly="${maven.checkstyle.rcurly}"
- parenPad="${maven.checkstyle.paren.pad}"
- allowTabs="${maven.checkstyle.allow.tabs}"
- allowProtected="${maven.checkstyle.allow.protected}"
- allowPackage="${maven.checkstyle.allow.package}"
- allowNoAuthor="${maven.checkstyle.allow.no.author}"
- maxLineLen="${maven.checkstyle.max.line.len}"
- tabWidth="${maven.checkstyle.tab.width}"
- ignoreLineLengthPattern="${maven.checkstyle.ignore.line.len.pattern}"
- maxMethodLen="${maven.checkstyle.max.method.len}"
- maxConstructorLen="${maven.checkstyle.max.constructor.len}"
- maxFileLen="${maven.checkstyle.max.file.len}"
- ignoreImportLen="${maven.checkstyle.ignore.import.len}"
- memberPattern="${maven.checkstyle.member.pattern}"
- publicMemberPattern="${maven.checkstyle.public.member.pattern}"
- paramPattern="${maven.checkstyle.param.pattern}"
- constPattern="${maven.checkstyle.const.pattern}"
- staticPattern="${maven.checkstyle.static.pattern}"
- typePattern="${maven.checkstyle.type.pattern}"
- methodPattern="${maven.checkstyle.method.pattern}"
- localVarPattern="${maven.checkstyle.local.var.pattern}"
- headerFile="${maven.checkstyle.header.file}"
- headerLinesRegexp="${maven.checkstyle.header.lines.regexp}"
- headerIgnoreLine="${maven.checkstyle.header.ignore.line}"
- javadocScope="${maven.checkstyle.javadoc.scope}"
- requirePackageHtml="${maven.checkstyle.require.package.html}"
- ignoreImports="${maven.checkstyle.ignore.imports}"
- illegalImports="${maven.checkstyle.illegal.imports}"
- ignoreWhitespace="${maven.checkstyle.ignore.whitespace}"
- ignoreCastWhitespace="${maven.checkstyle.ignore.cast.whitespace}"
- ignoreBraces="${maven.checkstyle.ignore.braces}"
- ignorePublicInInterface="${maven.checkstyle.ignore.public.in.interface}"
+ properties="${maven.checkstyle.properties}"
failOnViolation="${maven.checkstyle.fail.on.violation}"
cacheFile="${maven.checkstyle.cache.file}" >
<fileset dir="${maven.build.sourceDirectory}"
1.1
jakarta-turbine-maven/src/templates/build/plugins/core/turbine-checkstyle.properties
Index: turbine-checkstyle.properties
===================================================================
#
# Checkstyle settings ... default turbine project code settings, these can be
# overridden in a project specific properties file.
#
checkstyle.lcurly.type = nl
checkstyle.lcurly.method = nl
checkstyle.lcurly.other = nl
checkstyle.rcurly = alone
#checkstyle.paren.pad = nospace
#checkstyle.allow.tabs = false
#checkstyle.allow.protected = false
#checkstyle.allow.package = false
#checkstyle.allow.no.author = false
#checkstyle.max.line.len = 80
checkstyle.tab.width = 4
#checkstyle.ignore.maxlinelen = ^$
#checkstyle.max.method.len = 150
#checkstyle.max.constructor.len = 150
checkstyle.maxfilelen = 2000
#checkstyle.ignore.importlength = false
#checkstyle.pattern.member = ^[a-z][a-zA-Z0-9]*$
checkstyle.pattern.publicmember = ^f[A-Z][a-zA-Z0-9]*$
#checkstyle.pattern.parameter = ^[a-z][a-zA-Z0-9]*$
#checkstyle.pattern.const = ^[A-Z]([A-Z0-9_]*[A-Z0-9])?$
#checkstyle.pattern.static = ^[a-z][a-zA-Z0-9]*$
#checkstyle.pattern.type = ^[A-Z][a-zA-Z0-9]*$
#checkstyle.pattern.method = ^[a-z][a-zA-Z0-9]*$
#checkstyle.pattern.localvar = ^[a-z][a-zA-Z0-9]*$
#checkstyle.javadoc.scope = private
#checkstyle.require.package.html = false
#checkstyle.ignore.imports = false
checkstyle.illegal.imports =
#checkstyle.ignore.whitespace = false
#checkstyle.ignore.cast.whitespace = false
#checkstyle.ignore.braces = false
#checkstyle.ignore.public.in.interface = false
checkstyle.header.file = LICENSE.txt
#checkstyle.header.regexp = false
checkstyle.header.ignoreline = 1,6
1.1
jakarta-turbine-maven/src/templates/build/plugins/core/sun-code-conventions-checkstyle.properties
Index: sun-code-conventions-checkstyle.properties
===================================================================
# Sample checkstyle properties file to use with maven to support the
# sun code conventions
#
# To use this file, place the following in your project.properties:
#
#
maven.checkstyle.properties=${maven.home}/plugins/core/sun-code-conventions-checkstyle.properties
#
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>