vmassol     2003/03/17 01:28:46

  Modified:    samples/servlet build.xml
  Log:
  Added checkstyle check to samples/servlet project. It is not yet failiing on error 
as we need to fix a few checkstlye violations first... :-)
  
  Revision  Changes    Path
  1.10      +32 -1     jakarta-cactus/samples/servlet/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/samples/servlet/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml 17 Feb 2003 12:40:18 -0000      1.9
  +++ build.xml 17 Mar 2003 09:28:46 -0000      1.10
  @@ -348,8 +348,39 @@
           
       </target>
   
  -    <target name="dist" depends="prepare.dist,test"
  +    <target name="dist" depends="checkstyle,prepare.dist,test"
           description="Generate the distributable files">
  +    </target>
  +
  +    <!--
  +       ========================================================================
  +         Perform a code audit using CheckStyle. Only performs the audit if
  +         the checkstyle jar is in the Ant classpasth.
  +       ========================================================================
  +    -->
  +    <target name="checkstyle" depends="init,init.checkstyle" 
  +        if="checkstyle.available"
  +        description="Perform a code audit using Checkstyle">
  +
  +        <mkdir dir="${target.dir}"/>
  +
  +        <checkstyle config="./checkstyle.xml" failOnViolation="false">
  +
  +            <fileset dir="${src.java.dir}">
  +                <include name="**/*.java"/>
  +            </fileset>
  +            <fileset dir="${src.cactus.dir}">
  +                <include name="**/*.java"/>
  +            </fileset>
  +
  +            <formatter type="plain"/>
  +            <formatter type="xml"
  +                toFile="${target.dir}/checkstyle_results.xml"/>
  +
  +            <property key="checkstyle.header.file" file="./LICENSE.cactus"/>
  +
  +        </checkstyle>
  +
       </target>
   
       <!--
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to