Update of /cvsroot/struts/ajaxchat/WEB-INF/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21020/WEB-INF/src Added Files: ant-dependencies.jar build.xml checkstyle.xml commons-logging.properties javadoc_overview.htm simplelog.properties Log Message: --- NEW FILE: ant-dependencies.jar --- (This appears to be a binary file; contents omitted.) --- NEW FILE: build.xml --- <project name="AjaxChat" basedir="." default="build"> <!-- ****************************************************************** --> <!-- ** Build properties. ** --> <!-- ****************************************************************** --> <!-- "javadocs" is the directory where generated javadocs will be --> <!-- placed if the javadoc task is executed. --> <property name="javadocs" value="javadocs" /> <!-- "project_version" is, obviously, the version of the app! --> <property name="project_version" value="1.0" /> <!-- "proxy_host" is the address of the proxy server that will be --> <!-- used to download dependencies, if a proxy is required on your --> <!-- network. If no proxy is required, leave this blank (bute note --> <!-- that the property MUST be defined either way! --> <property name="proxy_host" value="" /> <!-- "proxy_post" is the port of the proxy server that will be --> <!-- used to download dependencies, if a proxy is required on your --> <!-- network. If no proxy is required, leave this set to "80". --> <property name="proxy_port" value="80" /> <!-- "distro_dir" is the directory where the generated distribution --> <!-- file will be placed as a result of executing the optional distro --> <!-- target. --> <property name="distro_dir" value="c:\temp" /> <!-- ****************************************************************** --> <!-- ** Define runtime classpath. These JARs are needed to run the ** --> <!-- ** application, as well as building it. ** --> <!-- ****************************************************************** --> <path id="runtime_classpath"> <pathelement path="../lib/commons-beanutils-1.7.0.jar" /> <pathelement path="../lib/commons-digester-1.7.jar" /> <pathelement path="../lib/commons-lang-2.1.jar" /> <pathelement path="../lib/commons-logging-1.0.4.jar" /> <pathelement path="../lib/struts-1.2.7.jar" /> </path> <!-- ****************************************************************** --> <!-- ** Default target that should usually be executed. ** --> <!-- ****************************************************************** --> <target name="build"> <get_dependencies /> <antcall target="compile" inheritRefs="true" /> <!--<antcall target="checkstyle" inheritRefs="true" />--> <!--<antcall target="javadocs" inheritRefs="true" />--> </target> <!-- ****************************************************************** --> <!-- ** Define the macro to download dependencies from Maven ** --> <!-- ** repository. This also populates the compiletime_classpath, ** --> <!-- ** which is the collection of JARs needed to build the app, ** --> <!-- ** but not to run it. ** --> <!-- ****************************************************************** --> <macrodef name="get_dependencies"> <sequential> <echo message="Retrieving compile-time dependencies..." /> <setproxy proxyhost="${proxy_host}" proxyport="${proxy_port}" /> <typedef classpath="ant-dependencies.jar" resource="dependencies.properties" /> <dependencies pathId="compiletime_classpath" verbose="true"> <!-- Servlet/JSP dependencies --> <dependency group="servletapi" version="2.3" /> <!-- Checkstyle dependencies --> <dependency group="checkstyle" version="3.4" /> <dependency group="antlr" version="2.7.5" /> <dependency group="regexp" version="1.3" /> <dependency group="commons-beanutils" version="1.7.0" /> </dependencies> <echo message="Done" /> </sequential> </macrodef> <!-- ****************************************************************** --> <!-- ** Compile everything. ** --> <!-- ****************************************************************** --> <target name="compile"> <echo message="Compiling everything..." /> <delete dir="../classes/org" /> <mkdir dir="../classes/org" /> <javac srcdir="." destdir="../classes" debug="true" debuglevel="lines,vars,source"> <classpath refid="runtime_classpath" /> <classpath refid="compiletime_classpath" /> </javac> <echo message="Done" /> </target> <!-- ****************************************************************** --> <!-- ** Run CheckStyle. ** --> <!-- ****************************************************************** --> <target name="checkstyle"> <echo message="Performing CheckStyle analysis using rules file checkstyle.xml..." /> <taskdef resource="checkstyletask.properties"> <classpath refid="runtime_classpath" /> <classpath refid="compiletime_classpath" /> </taskdef> <checkstyle config="checkstyle.xml" failOnViolation="false"> <classpath refid="runtime_classpath" /> <classpath refid="compiletime_classpath" /> <fileset dir="." includes="**/*.java" /> <formatter type="xml" toFile="checkstyle_results.xml" /> </checkstyle> <echo message="Done (results saved in WEB-INF/src/checkstyle_results.xml" /> </target> <!-- ****************************************************************** --> <!-- ** Make javadocs. ** --> <!-- ****************************************************************** --> <target name="javadocs"> <echo message="Making Javadocs..." /> <delete dir="${javadocs}" /> <mkdir dir="${javadocs}" /> <javadoc sourcepath="${basedir}" overview="${basedir}/javadoc_overview.htm" destdir="${javadocs}" packagenames="*" author="true" private="true" version="true" encoding="iso-8859-1" windowtitle="${ant.project.name} API Documentation" doctitle="<h1>${ant.project.name}<br>Version ${project_version}</h1>" bottom="Copyright © 2005 Frank W. Zammetti"> <classpath refid="runtime_classpath" /> <classpath refid="compiletime_classpath" /> </javadoc> <echo message="Done" /> </target> <!-- ****************************************************************** --> <!-- ** This target builds our distribution file. Note that you ** --> <!-- ** have executed the default target right before this. ** --> <!-- ****************************************************************** --> <target name="distro"> <echo message="Making distros..." /> <delete file="${distro_dir}/ajaxchat_${project_version_filename}.zip" /> <jar destfile="${distro_dir}/ajaxchat.war" basedir="../" /> <zip destfile="${distro_dir}/ajaxchat_${project_version_filename}.zip" basedir="${distro_dir}"> <include name="ajaxchat.zip" /> </zip> <checksum file="${distro_dir}/ajaxchat_${project_version_filename}.zip" forceOverwrite="yes"/> <echo message="Done" /> </target> <!-- ****************************************************************** --> <!-- ** Clean up after a build (i.e., remove build-transient ** --> <!-- ** artifacts from the directory structure. This should ALWAYS ** --> <!-- ** be executed before checking in to source control. ** --> <!-- ****************************************************************** --> <target name="clean"> <echo message="Cleaning up..." /> <delete dir="${javadocs}" /> <delete file="checkstyle_results.xml" /> <delete file="build_log.xml" /> <echo message="Done" /> </target> </project> --- NEW FILE: checkstyle.xml --- <?xml version="1.0"?> <!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> <module name="Checker"> <!-- This configuration set is capable of running all the checks --> <!-- that CheckStyle is capable of, except for the header checks. --> <!-- Those that do not apply to JavaWebParts have been commented out. --> <!-- The following modules must have a Checker as their prent --> <!-- Javadocs comments --> <module name="PackageHtml" /> <!-- Miscellaneous --> <!--<module name="NewlineAtEndOfFile" />--> <module name="Translation" /> <!-- Duplicate code --> <!--<module name="StrictDuplicateCode" />--> <!-- The following modules must have a Treewalker as their parent --> <module name="TreeWalker"> <!-- Javadocs comments --> <module name="JavadocType" /> <module name="JavadocMethod" /> <!-- Naming conventions --> <module name="AbstractClassName" /> <module name="ConstantName" /> <module name="LocalFinalVariableName" /> <module name="LocalVariableName" /> <module name="MemberName" /> <module name="MethodName" /> <module name="PackageName" /> <module name="ParameterName" /> <module name="StaticVariableName" /> <module name="TypeName" /> <!-- Imports --> <module name="AvoidStarImport" /> <module name="IllegalImport" /> <module name="RedundantImport" /> <module name="UnusedImports" /> <!--<module name="ImportOrder" />--> <!-- Size violations --> <!--<module name="ExecutableStatementCount" />--> <module name="FileLength" /> <module name="LineLength" /> <module name="MethodLength"> <property name="max" value="200" /> <property name="countEmpty" value="false" /> </module> <module name="AnonInnerLength" /> <module name="ParameterNumber" /> <!-- Whitespace --> <!--<module name="EmptyForInitializerPad" />--> <!--<module name="EmptyForIteratorPad" />--> <module name="MethodParamPad" /> <module name="NoWhitespaceAfter" /> <module name="NoWhitespaceBefore" /> <!--<module name="OperatorWrap" />--> <module name="ParenPad" /> <!--<module name="TypecastParenPad" />--> <module name="TabCharacter" /> <!--<module name="WhitespaceAfter" />--> <!--<module name="WhitespaceAround" />--> <!-- Modifiers --> <module name="ModifierOrder" /> <!-- Block checks --> <module name="EmptyBlock" /> <module name="LeftCurly" /> <module name="NeedBraces" /> <module name="RightCurly" /> <module name="AvoidNestedBlocks" /> <!-- Coding --> <module name="ArrayTrailingComma" /> <module name="AvoidInlineConditionals" /> <module name="CovariantEquals" /> <module name="DoubleCheckedLocking" /> <module name="EmptyStatement" /> <module name="EqualsHashCode" /> <!--<module name="FinalLocalVariable" />--> <module name="HiddenField" /> <module name="IllegalInstantiation" /> <!--<module name="IllegalToken" />--> <module name="IllegalTokenText" /> <module name="InnerAssignment" /> <!--<module name="MagicNumber" />--> <module name="MissingSwitchDefault" /> <!--<module name="ModifiedControlVariable" />--> <module name="RedundantThrows" /> <module name="SimplifyBooleanExpression" /> <module name="SimplifyBooleanReturn" /> <module name="StringLiteralEquality" /> <!--<module name="NestedIfDepth" />--> <module name="NestedTryDepth" /> <module name="SuperClone" /> <module name="SuperFinalize" /> <module name="IllegalCatch" /> <module name="PackageDeclaration" /> <module name="JUnitTestCase" /> <module name="ReturnCount"> <property name="max" value="5"/> </module> <!--<module name="IllegalType" />--> <module name="DeclarationOrder" /> <module name="ParameterAssignment" /> <module name="ExplicitInitialization" /> <module name="DefaultComesLast" /> <!--<module name="MissingCtor" />--> <module name="FallThrough" /> <!--<module name="MultipleStringLiterals" />--> <module name="MultipleVariableDeclarations" /> <!--<module name="RequireThis" />--> <module name="UnnecessaryParentheses" /> <!-- Class design --> <module name="VisibilityModifier" /> <module name="FinalClass" /> <module name="InterfaceIsType" /> <module name="HideUtilityClassConstructor" /> <!--<module name="DesignForExtension" />--> <module name="MutableException" /> <!--<module name="ThrowsCount" /> --> <!-- Metrics --> <module name="BooleanExpressionComplexity"> <property name="max" value="10" /> </module> <module name="ClassDataAbstractionCoupling"> <property name="max" value="15" /> </module> <module name="ClassFanOutComplexity"> <property name="max" value="30" /> </module> <!--<module name="CyclomaticComplexity" />--> <!--<module name="NPathComplexity" />--> <!--<module name="JavaNCSS " />--> <!-- Miscellaneous --> <module name="TodoComment" /> <module name="UncommentedMain" /> <module name="UpperEll" /> <module name="ArrayTypeStyle" /> <!--<module name="FinalParameters" />--> <module name="DescendantToken" /> <!--<module name="Indentation" />--> <!--<module name="TrailingComment" /> --> </module> </module> --- NEW FILE: commons-logging.properties --- org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog --- NEW FILE: javadoc_overview.htm --- <body> AjaxChat overview. </body> --- NEW FILE: simplelog.properties --- org.apache.commons.logging.simplelog.defaultlog=debug |