Figure 9.7. Configuring the violations plugin for a Freestyle project
9.4.2. Working with Maven Build Jobs
Maven build jobs in Jenkins use the Maven conventions and information in the project pom.xml file
to make configuration easier and more lightweight. When you use the Violations plugin with a Maven
build job, Jenkins uses these conventions to reduce the amount of work you need to do to configure the
plugin. You don’t need to tell Jenkins where to find the XML reports for many of the static analysis
tools (for example, Checkstyle, PMD, FindBugs, and CPD), as Jenkins can figure this out based from
the Maven conventions and plugin configurations (see Figure 9.8, “Configuring the violations plugin
for a Maven project”). If you do need to override these conventions, you can choose the Pattern option
in the “XML filename pattern” drop-down list, and enter a path as you do for freestyle build jobs.
Figure 9.8. Configuring the violations plugin for a Maven project