problems running checkstyle from ant

[email protected]
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
Hello everyone,

I'm having troubles running checkstyle 4.3 from an ant task - I've
followed the description on the checkstyle website, but it fails with
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/Converter
exception.

The confusing thing is the classpath printed just before the checkstyle
task is correct, i.e. it contains all the jar files from
checkstyle-4.3/lib, the files exist etc. The whole target is defined like
this:
------------------------------------------------------------------------

    <!-- CheckStyle -->
    <property name="checkstyle.home"    
value="external_resources/checkstyle" />
    <property name="checkstyle.ant"     
value="${checkstyle.home}/checkstyle-4.3.jar" />
    <property name="checkstyle.config"  
value="${checkstyle.home}/sun_checks.xml" />
    <property name="checkstyle.output"  
value="test/output/checkstyle.xml" />

    <path id="checkstyle.classpath">
      <fileset dir="${checkstyle.home}">
          <include name="*.jar" />
        </fileset>
    </path>

    <!-- checkstyle -->
    <taskdef resource="checkstyletask.properties"
classpath="${checkstyle.ant}" />
    <target name="checkstyle">

      <property name="myclasspath" refid="checkstyle.classpath" />
      <echo message="${myclasspath}" />

      <checkstyle config="${checkstyle.config}"
classpathref="checkstyle.classpath">

            <classpath refid="checkstyle.classpath" />

            <!-- what to check -->
            <fileset dir="${tdstool.src.home}">
                <include name="**/*.java"/>
            </fileset>

        </checkstyle>

    </target>

------------------------------------------------------------------------

Heve you seen such error - maybe it's something trivial or so, but I've
been debugging this for about two hours without luck.

Thanks for help
Tomas


-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
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.