Build Action for GitHub Java application with Maven
Once we save our new build job configuration (Build configuration for GitHub Java application with Maven), Jenkins will display the home page for this job.
This is where Jenkins displays details about the latest build results and the build history.
The build should kick off automatically, or we can also trigger the build manually using the Build Now button.
Jenkins server's home page shows a summary of all of our build jobs, including the current build status and general state of heath of each of our builds. It tells us when each build ran successfully for the last time, and when it last failed, and also the result of the last build.
Jenkins uses a weather metaphor to help give us an idea of the stability of our builds. Essentially, the more our builds fail, the worse the weather gets. This helps us get an idea of whether a particular broken build is an isolated event, or if the build is breaking on a regular basis, in which case it might need some special attention.
We can also manually trigger a build job here, using the build schedule button which looks a bit like a green play button on top of a clock.
When the build finishes, the ball in the Build History box becomes solid blue. This means the build was a success. Build failures are generally indicated by a red ball. For some types of project, we can also distinguish between a build error (such as a compiler error), indicated by a red ball, and other sorts of build failures, such as unit test failures or insufficient code coverage, which are indicated by a yellow ball.
Looks like out build failed. The 'Console Output' shows what went wrong, and our maven version is 2.2.1.
So, we need to update Maven to version 3:
Here are the steps to install Maven 3
- Remove older version:
$ sudo apt-get remove maven2
- Add following lines to sources.list:
$ sudo add-apt-repository "deb http://ppa.launchpad.net/natecarlson/maven3/ubuntu precise main"
- Update Repository and Install:
$ sudo apt-get update $ sudo apt-get install maven3
- Add Symbolic Link:
$ sudo ln -s /usr/share/maven3/bin/mvn /usr/bin/mvn
- Check the version:
$ mvn -v Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T09:37:52-08:00) Maven home: /usr/share/maven3 Java version: 1.7.0_65, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.13.0-35-generic", arch: "amd64", family: "unix"
Now build it again, then we can see the ball have changed to solid blue ball from red!
Now, the build was successful. The cloud represents build trend. If 9 out of 10 builds were successful, we probably have sunny weather.
Ph.D. / Golden Gate Ave, San Francisco / Seoul National Univ / Carnegie Mellon / UC Berkeley / DevOps / Deep Learning / Visualization