checkstyle-4.4 ANT Task help please.

Sami Mikhail <[email protected]>
Newsgroups gmane.comp.java.audit.checkstyle.user
Message-ID <[email protected]>
I was getting the dreaded

    <error line="0"severity="error"message="Got an 
exception - java.lang.ClassCastException: antlr.CommonAST"source="com.puppycrawl.tools.checkstyle.TreeWalker"/>

My build file is rather simple:
<project name="MyCheckStyle" default="checkstyle">
    
    <taskdef resource="checkstyletask.properties" classpath="E:\checkstyle-4.4\checkstyle-all-4.4.jar"/>
    
    <target name="checkstyle" description="Generates a report of code convention violations.">
    
        <echoproperties/>
    
        <checkstyle config="sun_checks.xml">
            <fileset dir="e:/src" includes="**/*.java"/>
            <formatter type="xml" toFile="mycheckstyle_errors.xml"/>
        </checkstyle>
    </target>

</project>

I got rid of it by getting rid of the ANTLR*.jar files in the Ant /lib directory. That's fine for now, but when this thing becomes part of our nightly build, we will need those ANTLR*.jar files back in. 

So what's the proper way of doing this?



 Any pointers appreciated. Thanks in advance.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

_______________________________________________
Checkstyle-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/checkstyle-user
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.