jenkins the definitive guide

(Jeff_L) #1
<groupId>com.acme.common</groupId>
<artifactId>cooltools</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>

</dependencies>

On your Jenkins server, you have set up Maven build jobs for both the cooltools and the game-of-life
applications. Since your game-of-life project needs the latest cooltools SNAPSHOT version, you tick
the “Build whenever a SNAPSHOT dependency is built” option. This way, whenever the cooltools
project is rebuilt, the game-of-life project will automatically be rebuilt as well.


5.9.2. Configuring the Maven Build


The next area where you will notice a change is in the Build section. In a Maven build job, the build
section is entirely devoted to running a single Maven goal (see Figure 5.38, “Specifying the Maven
goals”). In this section, you specify the version of Maven you want to execute (remember, at the time
of Maven, this will only work with Maven), the location of the pom.xml file, and the Maven goal (or
goals) to invoke. You can also add any command-line options you need here.


Figure 5.38. Specifying the Maven goals


In many cases, this is all you need to get your Maven build job configured. However, if you click on the
“Advanced...” button, you can take your pick of some more advanced features (Figure 5.39, “Maven
build jobs—advanced options”).


Figure 5.39. Maven build jobs—advanced options

Free download pdf