avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix build.xml
Date Thu, 21 Mar 2002 08:33:50 GMT
donaldp     02/03/21 00:33:50

  Modified:    .        build.xml
  Log:
  Make checkstyle part of the build process
  
  Revision  Changes    Path
  1.105     +50 -0     jakarta-avalon-phoenix/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/build.xml,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -r1.104 -r1.105
  --- build.xml	21 Mar 2002 04:40:40 -0000	1.104
  +++ build.xml	21 Mar 2002 08:33:49 -0000	1.105
  @@ -74,7 +74,9 @@
       <pathelement location="${jmxri.jar}"/>
       <pathelement location="${jmxtools.jar}"/>
       <pathelement location="${wrapper.jar}"/>
  +    <pathelement path="${checkstyle.jar}" />
       <pathelement path="${java.class.path}" />
  +
       <fileset dir="${lib.dir}">
         <include name="*.jar" />
       </fileset>
  @@ -213,6 +215,54 @@
       </jar>
   
     </target>
  +
  +    <target name="checkstyle" if="do.checkstyle" description="Checkstyle">
  +
  +        <!-- this invocation of checkstyle requires that checkstyle be downloaded and
setup -->
  +        <!-- thats why you are required to define do.checkstyle property to generate
the report -->
  +        <taskdef name="checkstyle"
  +            classname="com.puppycrawl.tools.checkstyle.CheckStyleTask">
  +            <classpath refid="project.class.path"/>
  +        </taskdef>
  +        <checkstyle
  +            lcurlyType="nl"
  +            lcurlyMethod="nl"
  +            lcurlyOther="nl"
  +            rcurly="ignore"
  +            allowProtected="false"
  +            allowPackage="false"
  +            allowNoAuthor="false"
  +            maxLineLen="100"
  +            maxMethodLen="100"
  +            maxConstructorLen="100"
  +            memberPattern="^m_[a-z][a-zA-Z0-9]*$"
  +            staticPattern="^c_[a-z][a-zA-Z0-9]*$"
  +            constPattern="(^c_[a-z][a-zA-Z0-9]*$)|([A-Z_]*$)"
  +            ignoreImportLen="true"
  +            allowTabs="false"
  +            javadocScope="protected"
  +            ignoreWhitespace="true"
  +            cacheFile="checkstyle.cache"
  +            failOnViolation="false"
  +            ignoreCastWhitespace="true">
  +            <fileset dir="${java.dir}">
  +                <include name="**/*.java"/>
  +            </fileset>
  +            <formatter type="plain"/>
  +            <formatter type="xml" toFile="build/checkstyle-results.xml"/>
  +        </checkstyle>
  +    </target>
  +
  +    <target name="checkstyle-report"
  +        depends="checkstyle"
  +        if="do.checkstyle"
  +        description="Generate Checkstyle Report">
  +
  +        <mkdir dir="${build.reports}/checkstyle"/>
  +        <style style="../tools/etc/checkstyle-frames.xsl" in="build/checkstyle-results.xml"
  +            out="${build.reports}/checkstyle/delete-me.html"/>
  +
  +    </target>
   
     <!-- Create the lite build -->
     <target name="dist-lite" depends="jars"
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message