Author: kkolinko Date: Sat Jun 9 11:17:55 2012 New Revision: 1348360 URL: http://svn.apache.org/viewvc?rev=1348360&view=rev Log: Merged revision 1348357 from tomcat/trunk: Add dependencies and description to "validate" target in build.xml, so that it can be run separately. Improve documentation for running with Checkstyle. Add documentation for ends of lines check ("validate-eoln").
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/BUILDING.txt tomcat/tc7.0.x/trunk/build.xml tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1348357 Modified: tomcat/tc7.0.x/trunk/BUILDING.txt URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/BUILDING.txt?rev=1348360&r1=1348359&r2=1348360&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/BUILDING.txt (original) +++ tomcat/tc7.0.x/trunk/BUILDING.txt Sat Jun 9 11:17:55 2012 @@ -223,24 +223,12 @@ The output of this command will be found ant release -(7) Enabling Checkstyle +(7) Tests -Tomcat comes with a Checkstyle configuration that tests its source code -for certain conventions, like presence of the license header. - -To enable Checkstyle checks during Tomcat build, add the following property -to build.properties file: - - execute.validate=true - -* NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat - build is optional and is off by default. - - -(8) Running the tests +(7.1) Running Tomcat tests -The tests are not run when a release is built. There is separate command -for running the tests. +Tomcat includes a number of junit tests. The tests are not run when a +release is built. There is separate command to run them. To run the testsuite use the following command: @@ -256,8 +244,6 @@ directory: output/build/logs -(8.1) Testing with APR connector - By default the testsuite is run three times to test 3 different implementations of Tomcat connectors: BIO, NIO and APR. (If you are not familiar with Tomcat connectors, see config/http.html in documentation for @@ -283,7 +269,7 @@ tcnative-1.dll file into ${tomcat.source into the above directory when the build runs. -(8.2) Running a single test class +(7.2) Running a single test It is possible to run a single JUnit test class by adding the "test.entry" property to the build.properties file. The property specifies the name of @@ -294,7 +280,7 @@ For example: test.entry=org.apache.catalina.util.TestServerInfo -(8.3) Other options +(7.3) Other configuration options 1. It is possible to enable generation of access log file when the tests are run. This is off by default and can be enabled by the following @@ -320,3 +306,52 @@ For example: files: junit.formatter.usefile=false + + +(8) Source code checks + +(8.1) Checkstyle + +* NOTE: Checkstyle is licensed under LGPL. Using Checkstyle during Tomcat + build is optional and is off by default. + +Tomcat comes with a Checkstyle configuration that tests its source code +for certain conventions, like presence of the license header. + +To enable Checkstyle, add the following property to build.properties file: + + execute.validate=true + +Once Checkstyle is enabled, the check will be performed automatically +during the build. The check is run before compilation of the source code. + +It is possible to run the check separately. The command is: + + cd ${tomcat.source} + ant validate + +To speed-up repeated runs of this check, a cache is configured. The cache +is located in the following directory: + + output/res/checkstyle + + +(8.2) End-of-line conventions check + +You usually would not need to run this check. You can skip this section. + +Apache Tomcat project has convention that all of its textual source files, +stored in Subversion repository, are marked with Subversion property +"svn:eol-style" with value of "native". This convention makes the editing +of source code on different platforms easier. + +This test is used by developers to check that the source code adheres to +this convention. It verifies that the ends of lines in textual files are +appropriate for the operating system where it is run. The idea is to run +this check regularly on two different platforms and notify developers when +an inconsistency is detected. + +The command to run this test is: + + cd ${tomcat.source} + ant validate-eoln Modified: tomcat/tc7.0.x/trunk/build.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/build.xml?rev=1348360&r1=1348359&r2=1348360&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/build.xml (original) +++ tomcat/tc7.0.x/trunk/build.xml Sat Jun 9 11:17:55 2012 @@ -438,7 +438,9 @@ </target> - <target name="validate" depends="download-validate" if="${execute.validate}"> + <target name="validate" if="${execute.validate}" + depends="build-prepare,compile-prepare,download-validate" + description="Uses Checkstyle tool to perform style check for the source code"> <!-- Required so we can cache checkstyle results --> <mkdir dir="${tomcat.output}/res/checkstyle"/> Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1348360&r1=1348359&r2=1348360&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original) +++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Jun 9 11:17:55 2012 @@ -393,6 +393,11 @@ <bug>53115</bug>: Fix using the command "<code>catalina.bat run</code>" when the value of <code>%TEMP%</code> contains spaces. (kkolinko) </fix> + <update> + Add dependencies and description to "validate" target in + <code>build.xml</code>, so that it could be run separately. + Improve documentation. (kkolinko) + </update> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org