I want the eclipse Java Compiler Warnings available as an ant task (ie without eclipse) - ideally as ant plugins - but I want the cruise control ant task to fail if an eclipse warning shows up. For the following warnings
Non-static access to static member
Method with a constructor name
Serializable class without serialVersionUID
Assignment has no effect
finally does not complete normally
Using a char array in string concatenation
Hidden catch block
Inexact type match for vararg arguments
Null pointer access
Type parameter hides another type
Method does not override package visible method
Interface method conflicts with protected 'Object' method
Local variable is never read
unused local or private member
Unchecked generic type operation
Usage of a raw type
Generic type parameter declared with a final type bound
Annotation is used as a super interface
I assume this means that the eclipse abstract syntax tree would have to be used - and an eclipse compilation unit would have to be created.
The question is: (1) Has this been done? (2) If it hasn't - then given a
org.eclipse.jdt.core.dom.CompilationUnit
object - how do you (ie in code examples) get the warnings out of this CompilationUnit?
(I KNOW about PMD, checkstyle etc - none of these EXACTLY match the eclipse preferences for coding style. I want an ant task that exactly matches the eclipse coding style)