Author: tfmorris
Date: 2008-04-24 15:57:30-0700
New Revision: 14466

Modified:
   trunk/src/argouml-build/build.xml

Log:
Add Checkstyle report.  Start fixing other static checks.

Modified: trunk/src/argouml-build/build.xml
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-build/build.xml?view=diff&rev=14466&p1=trunk/src/argouml-build/build.xml&p2=trunk/src/argouml-build/build.xml&r1=14465&r2=14466
==============================================================================
--- trunk/src/argouml-build/build.xml   (original)
+++ trunk/src/argouml-build/build.xml   2008-04-24 15:57:30-0700
@@ -70,7 +70,7 @@
   -->
 
 <project basedir=".." default="package" name="argouml">
-
+  
   <!-- =================================================================== -->
   <!-- Global initialization                                               -->
   <!-- =================================================================== -->
@@ -241,7 +241,9 @@
     <ant dir="argouml-core-infra" inheritAll="false"           target="jar"/>
     <ant dir="argouml-core-model" inheritAll="false"           target="jar"/>
     <ant dir="argouml-core-model-mdr" inheritAll="false"       target="jar"/>
-<!--    <ant dir="model-euml" inheritAll="false"      target="jar"/> -->
+<!--
+    <ant dir="argouml-core-model-euml" inheritAll="false"      target="jar"/>
+-->
     <ant dir="argouml-app" inheritAll="false"                  target="jar"/>
 
     <!-- Copy everything to the build directory -->
@@ -604,6 +606,26 @@
   <!-- Section with static analysis things.                                -->
   <!-- ################################################################### -->
 
+          
+  <!-- ================================= 
+          target: checkstyle              
+       ================================= -->
+    <target name="checkstyle" depends="init" 
+      description="--> Run Checkstyle on sources">
+      
+    <taskdef resource="checkstyletask.properties"
+               
classpath="${argo.tools.dir}/checkstyle-4.3/checkstyle-all-4.3.jar"/>
+        
+    <checkstyle config="${argo.tools.dir}/checkstyle/checkstyle_argouml.xml" 
+      properties="${argo.tools.dir}/checkstyle/checkstyle-ant.properties"> 
+      <fileset dir="${argo.root.dir}/argouml-app/src" includes="**/*.java"
+        excludes="**/JavaRecognizer.java **/JavaLexer.java 
**/JavaTokenTypes.java"/>
+      <formatter type="plain"/>
+      <formatter type="xml" toFile="${argo.build.dir}/checkstyle_errors.xml"/>
+    </checkstyle>
+      
+    </target>
+
   <!-- =================================================================== -->
   <!-- Perform JDepend to find about the structure in ArgoUML.             -->
   <!-- =================================================================== -->
@@ -623,7 +645,7 @@
 For details see http://www.clarkware.com/software/JDepend.html.
     </echo>
     <java classname="jdepend.swingui.JDepend" failonerror="true" fork="true">
-      <arg value="."/>
+      <arg value="${argo.root.dir}/argouml-app/src/org"/>
       <classpath>
         <path refid="ant.optional.classpath"/>
       </classpath>
@@ -684,7 +706,8 @@
       <ruleset>basic</ruleset>
       <formatter type="html" toFile="${pmd.reports.dir}/pmd-report.html" 
         linkPrefix="http://pmd.sourceforge.net/xref/"/>
-      <fileset dir="${argo.src.dir}/org" includes="**/*.java">
+      <!-- TODO: Need other parts of source tree here -->
+      <fileset dir="${argo.root.dir}/argouml-app/src/org" includes="**/*.java">
         <exclude name="**/JavaLexer.java"/>
         <exclude name="**/JavaRecognizer.java"/>
         <exclude name="**/JavaTokenTypes.java"/>
@@ -700,7 +723,7 @@
     <delete file="${cpd.report.file}.*"/>
     <cpd minimumTokenCount="100" outputFile="${cpd.report.file}.xml" 
       format="xml" encoding="UTF-8">
-      <fileset dir="${argo.src.dir}">
+      <fileset dir="${argo.root.dir}/argouml-app/src">
         <include name="**/*.java"/>
         <exclude name="**/JavaLexer.java"/>
         <exclude name="**/JavaRecognizer.java"/>
@@ -740,7 +763,7 @@
   <!-- TODO: This target is not yet tested with the new structure. 
   depends="compile"
   -->
-  <target name="classycle" 
+  <target name="classycle" depends="init"
         description="Analyze sources for cyclic dependencies using Classcycle">
     <echo>
   Running classcyle on ${source.dir}.
@@ -767,3 +790,4 @@
 
 </project>
 <!-- End of file -->
+

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

Reply via email to