Anyone know of a Maven plugin that will enforce design rules? I would like to be able to cause a build error when someone does things like throwing SQLException from DAO layer or when a method in Service object excepts a Hibernate specific Object.
Tim Holloway wrote:
There are some things that can help. A product that can scan for questionable usages whose exact name escapes me (it's something like BugBuddy). I think it is supported by a Maven plugin, but it's also something that can plug into an IDE.
Joachim Rohde wrote:I guess you are referring to FindBugs (http://findbugs.sourceforge.net) or PMD (http://pmd.sourceforge.net/). Both tools can be extended by customized rules. But from top of my head I can't think of any rule, which would check for certain exceptions. But maybe it's a better starting point than writing a customized tool from scratch.