Author: kkolinko
Date: Sat Jun  9 11:11:18 2012
New Revision: 1348357

URL: http://svn.apache.org/viewvc?rev=1348357&view=rev
Log:
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/trunk/BUILDING.txt
    tomcat/trunk/build.xml

Modified: tomcat/trunk/BUILDING.txt
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/BUILDING.txt?rev=1348357&r1=1348356&r2=1348357&view=diff
==============================================================================
--- tomcat/trunk/BUILDING.txt (original)
+++ tomcat/trunk/BUILDING.txt Sat Jun  9 11:11:18 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/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1348357&r1=1348356&r2=1348357&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Sat Jun  9 11:11:18 2012
@@ -449,7 +449,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"/>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to