01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 | < plugin > < groupId >org.codehaus.mojo</ groupId > < artifactId >findbugs-maven-plugin</ artifactId > < version >2.3.3</ version > < configuration > < trace >false</ trace > < effort >Max</ effort > < threshold >Low</ threshold > < xmlOutput >true</ xmlOutput > < failOnError >false</ failOnError > </ configuration > < executions > < execution > < phase >verify</ phase > < goals > < goal >findbugs</ goal > </ goals > </ execution > </ executions > </ plugin > < plugin > |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | < plugin > < groupId >org.codehaus.groovy.maven</ groupId > < artifactId >gmaven-plugin</ artifactId > < version >1.0</ version > < executions > < execution > < phase >install</ phase > < goals > < goal >execute</ goal > </ goals > < configuration > < source > def file = new File("${project.build.directory}/findbugsXml.xml") if (!file.exists()) { log.warn("Findbugs XML report is absent: " + file.getPath()) } def xml = new XmlParser().parse(file) def bugs = xml.BugInstance def total = bugs.size() if (total > 0) { log.info("Total bugs: " + total) for (i in 0..total-1) { def bug = bugs[i] log.info("\n"+ bug.LongMessage.text() + " " + bug.Class.'@classname' + " " + bug.Class.SourceLine.Message.text() +"\n") } } </ source > </ configuration > </ execution > </ executions > </ plugin > |
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 | < plugin > < groupId >org.apache.maven.plugins</ groupId > < artifactId >maven-checkstyle-plugin</ artifactId > < version >2.8</ version > < configuration > < consoleOutput >true</ consoleOutput > < configLocation >checkstyle.xml</ configLocation > < propertyExpansion >basedir=${project.basedir}</ propertyExpansion > </ configuration > < executions > < execution > < phase >verify</ phase > < goals > < goal >checkstyle</ goal > </ goals > </ execution > </ executions > </ plugin > < plugin > |