junit.jar=${junit.lib}/junit.jar
junit.loc=${base-sf.loc}/junit/junit3.8.2.zip
+# ----- Checkstyle, version 5.1 or later -----
+checkstyle.version=5.1
+checkstyle.home=${base.path}/checkstyle-${checkstyle.version}
+checkstyle.loc=${base-sf.loc}/checkstyle/checkstyle-${checkstyle.version}.zip
+checkstyle.jar=${checkstyle.home}/checkstyle-all-${checkstyle.version}.jar
+
# ----- JSON Libraries (for bayeux module) -----
json-lib.home=${base.path}/json-20080701
json-lib.lib=http://repo1.maven.org/maven2/org/json/json/20080701/json-20080701.jar
</target>
- <target name="compile" depends="build-prepare,download-compile">
+ <target name="validate" depends="download-validate">
+ <taskdef resource="checkstyletask.properties"
+ classpath="${checkstyle.jar}" />
+ <checkstyle config="checkstyle.xml">
+ <fileset dir="java">
+ <include name="**/*.java" />
+ <exclude name="org/apache/tomcat/util/bcel/**" />
+ </fileset>
+ </checkstyle>
+ </target>
+
+ <target name="compile" depends="build-prepare,download-compile,validate">
<!-- Compile internal server components -->
<javac srcdir="java" destdir="${tomcat.classes}"
<!-- ================ Download and dependency building =================== -->
+ <target name="download-validate"
+ description="Download components necessary to validate source" >
+
+ <antcall target="downloadzip">
+ <param name="sourcefile" value="${checkstyle.loc}"/>
+ <param name="destfile" value="${checkstyle.jar}"/>
+ <param name="destdir" value="${base.path}"/>
+ </antcall>
+
+ </target>
+
<target name="download-compile"
description="Download (and build) components necessary to compile" >
--- /dev/null
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+<module name="Checker">
+<!--
+ <module name="FileTabCharacter"/>
+-->
+</module>
\ No newline at end of file
Re-factor unit tests to enable them to be run once with each of the HTTP
connector implementations (BIO, NIO and APR/native). (markt)
</add>
+ <add>
+ <bug>49268</bug>: Add the necessary plumbing to include CheckStyle in
+ the build process. Start with no checks. Additional checks will be
+ added as they are agreed. (markt)
+ </add>
</changelog>
</subsection>
</section>