From IcedTea

Jump to: navigation, search

Thermostat uses Maven 3 as a build tool. We've added a few features to our build in order to support the different use cases to build and verify thermostat. Use cases include:

  • Running performance tests during a build
  • Verifying maven archetypes via Makefile


1 Dependencies

In order to obtain, build and run, Thermostat requires:

 mercurial maven mongodb mongodb-server java-1.{7,8}.0-openjdk libsecret-devel make libtool autoconf automake gcc gtk2-devel

2 Basic Maven Build

In the top-level directory run (this will run all tests including integration tests):

$ mvn -T1C clean integration-test

This will produce a Thermostat "image" in directory distribution/target/image. For an upstream build we generally call this directory $THERMOSTAT_HOME. The Thermostat binary is then in $THERMOSTAT_HOME/bin/thermostat, thus, distribution/target/image/bin/thermostat

For Thermostat development it might be handy to get builds done faster (by skipping integration tests for intermediate builds; saves ~2-3mins of build time):

$ mvn -T1C clean package

3 Build Profiles

The most relevant build profiles are listed below.

3.1 Performance Test Profile

If this profile gets activated, the Thermostat build runs performance tests during a build. In order to activate this profile run the build with:

$ mvn -Pperf-tests clean integration-test

3.2 Code Coverage Profile

This profile needs to get activated for builds that want code coverage. If this profile isn't activated the prepare-agent action which sets up the java agent for code coverage during tests won't run. For example a Jenkins build with code coverage does this:

$ mvn -Pcode-coverage jacoco:prepare-agent clean install jacoco:report

4 Verify Maven Archetypes

In order to verify that the simple maven archetype works, one can run the following:

$ make verify-archetype-ext

In order to verify that the multiple maven module Thermostat archetype works one may run the following:

$ make verify-archetype-multimodule
Personal tools