ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Checkstyle task
Date Mon, 28 Feb 2005 16:04:53 GMT
I'm having a heck of a time trying to get a CheckStyle task up and
running... I'm using Ant 1.6.2 and CheckStyle 3.4.  Here's what I have in
my build.xml:

  <target name="static_analysis">
    <echo message="Performing static code analysis..." />
    <taskdef resource="checkstyletask.properties" />
    <checkstyle config="docs/sun_checks.xml">
      <fileset dir="${toa_base_dir}/WEB-INF/classes" includes="**/*.java"/>
      <formatter type="plain" />
      <formatter type="xml"
toFile="${toa_base_dir}/source/static_analysis_checkstyle.xml" />
    </checkstyle>
    <echo message="Done" />
  </target>

I'm trying to run the analysis on all the classes generated by a previous
compile step, which was done into a standard webapp directory structure. 
I'd like the output to go to the console as well as an XML report file.

The property toa_base_dir is properly defined.  I know this because all
the other tasks in the build work fine using it.

I'm getting:

static_analysis:
     [echo] Performing static code analysis...
  [taskdef] Could not load definitions from resource
checkstyletask.properties. It could not be found.

I have a classpath definition which includes:

    <pathelement
location="${toa_base_dir}/source/libutils/checkstyle-all-3.4.jar" />

I've verified the JAR is there and is spelled accurately here.  There are
a number of other JARs in that directory, all of which are added to the
path as expected, so I know the basic path construction works.

I've read that there may or may not be some compatibility issues with this
version of CheckStyle and Ant about 1.5, but I haven't found any actual
answers to what to do about it.  Can anyone help?  Thanks very much!

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message