checkstyle-4.4 ANT Task help please.

View: New views
1 Messages — Rating Filter:   Alert me  

checkstyle-4.4 ANT Task help please.

by Sami Mikhail :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
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
Checkstyle-user@...
https://lists.sourceforge.net/lists/listinfo/checkstyle-user