carnold     2005/05/22 00:32:17

  Modified:    .        build.xml build.properties.sample
               tests    build.xml build.properties.sample
               src      sun_checks.xml
  Log:
  Bug 35009: Jalopy and checkstyle targets in build.xml
  
  Revision  Changes    Path
  1.160     +37 -0     logging-log4j/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/build.xml,v
  retrieving revision 1.159
  retrieving revision 1.160
  diff -u -r1.159 -r1.160
  --- build.xml 18 May 2005 05:16:12 -0000      1.159
  +++ build.xml 22 May 2005 07:32:17 -0000      1.160
  @@ -626,6 +626,43 @@
     
     
     <!-- ================================================================= -->
  +  <!-- This target reformats the source with Jalopy.                      -->
  +  <!-- ================================================================= -->
  +
  +  <target name="jalopy" depends="init" description="Reformat source code 
using Jalopy">
  +        <fail unless="jalopy.files">
  +Specify files to reformat with -Djalopy.files=PATTERN.
  +</fail>
  +             <taskdef name="jalopy"
  +             classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
  +                 <classpath>
  +             <fileset dir="${jalopy-ant.dir}/lib">
  +                    <include name="*.jar" />
  +                </fileset>
  +            </classpath>
  +        </taskdef>
  +        <jalopy backup="no" 
  +             convention="src/log4j-coding-convention.xml"
  +             classpathref="compile.classpath">
  +            <fileset dir="${java.source.dir}" includes="${jalopy.files}"/>
  +        </jalopy>
  +          
  +  </target>
  +
  +  <!-- ================================================================= -->
  +  <!-- This target reformats the source with Jalopy.                      -->
  +  <!-- ================================================================= -->
  +
  +  <target name="checkstyle" depends="init" description="Check source code 
using checkstyle">
  +        <property name="checkstyle.files" value="**/*.java"/>
  +        <taskdef resource="checkstyletask.properties"
  +         classpath="${checkstyle.jar}"/>
  +        <checkstyle config="src/sun_checks.xml">
  +            <fileset dir="${java.source.dir}" 
includes="${checkstyle.files}"/>
  +        </checkstyle>          
  +  </target>
  +  
  +  <!-- ================================================================= -->
     <!-- This target builds the javadoc files.                             -->
     <!-- ================================================================= -->
     <target name="javadoc" depends="init, slf4jCheck">
  
  
  
  1.26      +9 -1      logging-log4j/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/logging-log4j/build.properties.sample,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- build.properties.sample   18 May 2005 04:36:25 -0000      1.25
  +++ build.properties.sample   22 May 2005 07:32:17 -0000      1.26
  @@ -66,6 +66,14 @@
   
   #jndi.jar=/java/lib/jndi.jar
   
  +#
  +#   Jalopy source code reformatter
  +#
  +#
  +jalopy-ant.dir=${lib.home.dir}/jalopy-ant-0.6.2
   
  -
  +#
  +#   Checkstyle coding convention checker
  +#
  
+checkstyle.jar=${lib.home.dir}/checkstyle-4.0-beta2/checkstyle-all-4.0-beta2.jar
   
  
  
  
  1.107     +40 -2     logging-log4j/tests/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/build.xml,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- build.xml 12 May 2005 04:53:13 -0000      1.106
  +++ build.xml 22 May 2005 07:32:17 -0000      1.107
  @@ -131,7 +131,7 @@
              excludes="${stem}/chainsaw/receivers/*.java,
                        ${stem}/selector/PassByJNDI.java,
                        ${stem}/ugli/**.java,
  -                     ${stem}/db/**.java,

  +                     ${stem}/db/**.java,
                        org/apache/ugli/**/*.java"
           deprecation="${deprecation}"
           debug="on">
  @@ -515,7 +515,7 @@
         <test name="org.apache.log4j.or.ORTestCase" />
       </junit>
     </target>
  -
  +  
     <target name="DRFA" depends="check, build, cleanOutputDir">
       <junit printsummary="yes" fork="yes" haltonfailure="yes">
         <classpath refid="tests.classpath"/>
  @@ -816,6 +816,44 @@
           </current>
         </clover-report>
       </target>
  +    
  +  <!-- ================================================================= -->
  +  <!-- This target reformats the source with Jalopy.                      -->
  +  <!-- ================================================================= -->
  +
  +  <target name="jalopy" description="Reformat source code using Jalopy">
  +        <fail unless="jalopy.files">
  +Specify files to reformat with -Djalopy.files=PATTERN.
  +</fail>
  +             <taskdef name="jalopy"
  +             classname="de.hunsicker.jalopy.plugin.ant.AntPlugin">
  +                 <classpath>
  +             <fileset dir="${jalopy-ant.dir}/lib">
  +                    <include name="*.jar" />
  +                </fileset>
  +            </classpath>
  +        </taskdef>
  +        <jalopy backup="no" 
  +             convention="../src/log4j-coding-convention.xml"
  +             classpathref="tests.classpath">
  +            <fileset dir="${tests.source.home}" includes="${jalopy.files}"/>
  +        </jalopy>
  +          
  +  </target>
  +
  +  <!-- ================================================================= -->
  +  <!-- This target reformats the source with Jalopy.                      -->
  +  <!-- ================================================================= -->
  +
  +  <target name="checkstyle" description="Check source code using checkstyle">
  +        <property name="checkstyle.files" value="**/*.java"/>
  +        <taskdef resource="checkstyletask.properties"
  +         classpath="${checkstyle.jar}"/>
  +        <checkstyle config="../src/sun_checks.xml">
  +            <fileset dir="${tests.source.home}" 
includes="${checkstyle.files}"/>
  +        </checkstyle>          
  +  </target>
  +    
     
   </project>
   
  
  
  
  1.11      +9 -2      logging-log4j/tests/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/build.properties.sample,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- build.properties.sample   12 May 2005 03:18:30 -0000      1.10
  +++ build.properties.sample   22 May 2005 07:32:17 -0000      1.11
  @@ -15,6 +15,13 @@
   slf4j-api.jar=${lib.home.dir}/slf4j-1.0-beta2/slf4j-nop.jar
   
   
  +#
  +#   Jalopy source code reformatter
  +#
  +#
  +jalopy-ant.dir=${lib.home.dir}/jalopy-ant-0.6.2
   
  -# normally other build related properties would be defined here, but
  -# for now there are no other required properties.
  +#
  +#   Checkstyle coding convention checker
  +#
  
+checkstyle.jar=${lib.home.dir}/checkstyle-4.0-beta2/checkstyle-all-4.0-beta2.jar
  
  
  
  1.2       +5 -3      logging-log4j/src/sun_checks.xml
  
  Index: sun_checks.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/sun_checks.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- sun_checks.xml    18 Mar 2003 21:20:38 -0000      1.1
  +++ sun_checks.xml    22 May 2005 07:32:17 -0000      1.2
  @@ -48,7 +48,11 @@
   
       <!-- standard whitespace settings -->
       <module name="ParenPad"/>
  -    <module name="NoWhitespaceAfter"/>
  +    <!--  default conflicts with jalopy configuration which
  +              places a space after the opening brace of an array 
initialization  -->
  +    <module name="NoWhitespaceAfter">
  +        <property name="tokens" value="BNOT, DEC, DOT, INC, LNOT, 
UNARY_MINUS, UNARY_PLUS"/>
  +    </module>
       <module name="NoWhitespaceBefore"/>
       <module name="WhitespaceAfter"/>
       <module name="WhitespaceAround"/>
  @@ -56,11 +60,9 @@
   
   
       <!--                       JavaDoc guidelines -->
  -    <!--
       <module name="JavadocMethod"/>
       <module name="JavadocType"/>
       <module name="JavadocVariable"/>
  -    -->
   
   
       <!--                                        JLS -->
  
  
  

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

Reply via email to