In part 3, we will look at how to build a Maven Java project. We already added the project to the build job in part 2, but we did not configure the build step to actually perform the compilation using Maven.
Auto detect build steps
It is as good as it sounds. I clicked 'Auto detect build steps' and the build step was automatically created to perform a 'maven clean test'.
Check the checkbox in the table and click 'Use selected' to add the build step to your build job.
Observe the 'mvn clean test' step in the table.
Run the build job
Run the build by clicking the 'Run' button at the top of the page. A live status and percentage of completion is shown on the project view.
Edit the maven goalsClick on the 'Edit' link on the maven build step row (second column from the right).
Change 'clean test' to 'clean test compile'.
Run the build again using the Run button. The build log now shows the Maven build step.
The 'Maven Build Info' tab shows that the jar artifact was compiled successfully.
I am curious to see more of this tool. The auto detect feature is very impressive.