In this section, we will have a look at the other most commonly used build job: Maven 2/3 build jobs.
Maven build jobs are specifically adapted to Maven 2 and Maven 3 builds. Creating a Maven build job requires considerably less work than configuring the equivalent freestyle build job. Maven build jobs support advanced Maven-related features such as incremental builds on multimodule projects and triggering builds from changes in snapshot dependencies, and make configuration and reporting much simpler.
However, there is a catch: Maven 2/3 build jobs are less flexible than freestyle build jobs, and don’t support multiple build steps within the same build job. Some users also report that large Maven projects tend to run more slowly and use more memory when configured as Maven build jobs rather than as Freestyle ones.
In this section, we will investigate how to configure Maven 2/3 builds, when you can use them, as well as their advantages and limitations.
To create a new Maven build job, just choose the “”Build a maven2/3 project” option in the New Job page (see Figure 5-37).
Figure 5-37. Creating a new Maven build job
At first glance, the Maven 2/3 build job configuration screen is very similar to the one we saw for freestyle builds in the previous section. The first difference you may notice is in the Build Triggers ...