jenkins the definitive guide

(Jeff_L) #1

Once you’ve committed these changes, Jenkins should pick them up and kick off a build. Once this is
done, you will be able to see the fruit of your work on the build job home page (see Figure 2.24, “Now
the build is back to normal”)—the build status is blue again and all is well. Also notice the way we are
building up a trend graph showing the number of succeeding unit tests over time—this sort of report
really is one of Jenkins’s strong points.


Figure 2.24. Now the build is back to normal


2.7. More Reporting—Displaying Javadocs


For many Java projects, Javadoc comments are an important source of low-level technical
documentation. There are even tools, such as UmlGraph, that let you produce Javadoc with embedded
UML diagrams to give you a better picture of how the classes fit together in the application. This sort of
technical documentation has the advantage of being cheap to produce, accurate and always up-to-date.


Jenkins can integrate Javadoc API documentation directly into the Jenkins website. This way, everyone
can find the latest Javadoc easily, in a well known place. Often, this sort of task is performed in a separate
build job, but for simplicity we are going to add another build step to the gameoflife-default build job
to generate and display Javadoc documention for the Game of Life API.


Start off by going into the “gameoflife-default” configuration screen again. Click on “Add build step”,
and add a new build step to “Invoke top level Maven targets” (see Figure 2.25, “Adding a new build step
and report to generate Javadoc”). In the Goals field, place javadoc:javadoc—this will tell Maven to
generate the Javadoc documentation.

Free download pdf