Neil Hopcroft

A digital misfit

Maven Continuous Integration builds

Jenkins CI includes Maven integration, to take advantage of it I have added a main Maven pom.xml build file. To build a set of projects add them as modules and select ‘pom’ packaging. The Maven build then resolves the dependencies among the included projects and builds them in the appropriate order, publishing the results to the repository as they are built.

When setting up a CI build with deployment goals I publish them to the SNAPSHOT repository, which automates handling of version identifiers for deployed items without overwriting existing versions. This will need a little more thinking to make real releases.

These builds didn’t pick up the JUnit tests I had liberally scattered through the source code, but a quick reorganisation of the test code to put it all under the test/ directory, and appropriate change to the pom.xml file, makes the tests build and run. Of course they are still failing, but at least they are running.

Adding some plugins to Jenkins helps to visualise how the project is going, I’m using JUnit Plugin and Test Results Analyzer Plugin, which give some nice analysis of how the tests are going and graphs to show progress over recent builds.

Leave a Reply

Your email address will not be published.