In this lab we configure Maven to perform a build. This includes pulling the source code for the build from SCM. At the end of the build process, we also create an artifact for the build.
Successfully complete this lab by achieving the following learning objectives:
- Configure Maven Installer
Navigate to the public IP address and specify port 8080.
Navigate to Manage Jenkins and then Global Tool Configuration. Scroll down to Maven installations and add a new one.
The Maven installation should be named "M3".
Create a new Maven installation and set it to install automatically.
- Configure the Build to Use Maven and Make the Index File
Create a new Freestlye Project called "mavenproject".
Update the source code management to use the Git repository provided in the lab instructions.
Add and configure a build step for top-level Maven components.
Configure M3 as the Maven server and set the Goals to "clean package".
Configure a build step to run the following go command:
Add a post-build step to archive the artifacts.
Fingerprint all archived artifacts and set the file to
Run the build and verify that the
index.jspis in the root of the directory.