I recommend to run checkstyle automatically on each build (if you set that you will probably get a ton of errors). See https://github.com/ColinHebert/Sakai-Solr/blob/master/pom.xml#L226