Let's configure a Maven project in Jenkins with static code analysis, compilation of files, creation of the package file, and archiving it so you can use it later in another build job or project.
Configuring a Maven project for execution
Getting ready
You have already created a Maven project in Jenkins in Chapter 1, Getting Started with Jenkins, in the recipe, Creating a Maven Job for a Maven project.
How to do it...
- Go to Jenkins dashboard | Maven Project | General Section.
- Select Discard old builds | Configure Max # of builds to keep (to avoid too many builds and...