Solving a maven-checkstyle-plugin ClassCastException for DetailAST
When the maven-checkstyle-plugin generates errors like:
antlr.CommonAST cannot be cast to com.puppycrawl.tools.checkstyle.api.DetailAST
it may help to remove these artifacts from your local Maven repository:
- antlr
- commons-beanutils
- maven-checkstyle-plugin
At least it worked for me. Found this suggestion on the issue tracker of the plugin.