svn commit: r14617 - trunk/src/argouml-build/build.xml

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-05-04 20:47:55-0700
New Revision: 14617

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

Log:
Fix checkstyle to deal with basedir change.  Use correct code to find tools dir

Modified: trunk/src/argouml-build/build.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-build/build.xml?view=diff&rev=14617&p1=trunk/src/argouml-build/build.xml&p2=trunk/src/argouml-build/build.xml&r1=14616&r2=14617
==============================================================================
--- trunk/src/argouml-build/build.xml	(original)
+++ trunk/src/argouml-build/build.xml	2008-05-04 20:47:55-0700
@@ -155,16 +155,16 @@
 
     <!-- we really need an absolute path for argo.root.dir -->
     <!-- if it is set in a property file before now, it must be absolute -->
-    <property name="argo.root.dir" value="${basedir}" />
+    <property name="argo.root.dir" value="${basedir}/.." />
     <property file="${override.build.properties}"/>
 
     <!-- Try to figure out where our tools directory is. Done after overrides
-    are loaded so user can override, but before defaults
-    Thanks Tom for this magic! -->
-    <available file="../argouml-core-tools" type="dir"
-               property="argo.tools.dir" value="../argouml-core-tools"/>
-    <available file="../../tools" type="dir"
-               property="argo.tools.dir" value="../../tools"/>
+    are loaded so user can override, but before defaults -->
+    <property name="tool.test.file" value="checkstyle/java.header"/>
+    <available file="${argo.root.dir}/argouml-core-tools/${tool.test.file}" 
+        type="file" property="argo.tools.dir" value="${argo.root.dir}/argouml-core-tools"/>
+    <available file="../../tools/${tool.test.file}" 
+        type="file" property="argo.tools.dir" value="../../tools"/>
 
     <property file="default.properties"/>
 
@@ -623,13 +623,14 @@
        ================================= -->
   <target name="checkstyle" depends="init" 
           description="Run Checkstyle on sources">
-      
+    <echo message="argo.tools.dir = ${argo.tools.dir}" />
     <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"
+      <fileset dir="${argo.root.dir}" 
+      	includes="argouml-app/src/**/*.java argouml-core-*/src/**/*.java"
         excludes="**/JavaRecognizer.java **/JavaLexer.java **/JavaTokenTypes.java"/>
       <formatter type="plain"/>
       <formatter type="xml" toFile="${argo.build.dir}/checkstyle_errors.xml"/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.