Continuous Integration

Ivy Projects are designed to be built on a continuous integration (CI) server like Jenkins.

Maven build plugin

The project-build-plugin is a Maven plugin that can build Axon Ivy Projects on a developer machine or on a continuous integration server. The plugin provides the following main features:

  • Compilation of Axon Ivy Projects

  • Testing of unit tests against an Ivy Project or the Axon Ivy core classes

  • Packaging of built Axon Ivy Projects as IAR (ivy archive) artifacts

  • Installation of IAR artifacts into the local Maven repository

  • Deployment of IAR artifacts to an Axon Ivy Engine

Runtime

The Designer has a built in Maven runtime that allows to start Maven with zero initial configuration effort. A local maven build can be started as follows:

  1. Switch to the Java perspective

  2. Expand an Ivy Project in the Axon Ivy Project Tree view

  3. Open the context menu of the file pom.xml by right clicking it

  4. Navigate to Run as > Maven install

Configuration

Ivy Projects declare its ids and dependencies in the Project Deployment Descriptor. This deployment descriptor can be easily edited with the corresponding Axon Ivy editor and is stored as Maven Project Object Model (pom.xml). Therefore each Axon Ivy Project has by default the pom.xml which is needed by maven to build it.

However advanced Maven users can adjust this default configuration and use additional Maven plugins or dependencies in the pom.xml. But not all POM entries should be modified, some are required or limited in usage in Ivy Projects:

  • <groupId/>and <version/>Must be set in every Axon Ivy Project POM. It can not be inherited from a parent POM (even tough this is valid in plain Maven).

  • <packaging>iar</packaging> Provides the custom Axon Ivy Project lifecycle, must not be modified.

  • Dependencies with <type>iar</type> will be manipulated by the Project Deployment Descriptor. Therefore additional configurations like the <scope> could get lost trough the simple editor usage.

  • Values that can be manipulated with the simple Project Deployment Descriptor can not contain Maven properties. For instance <version>${myVersionProp}</version> is prohibited.

  • The version must be qualified like <version>5.0.0-SNAPSHOT</version>. A version like <version>5-SNAPSHOT</version> is prohibited.

Technical documentation

  • The detailed plugin goal and parameter documentation is on Github.io

  • The source code of the Axon Ivy project build plugin is available on Github.com.

Continuous Integration Job with Jenkins

The following steps are needed to build an Ivy Project on a Jenkins CI server.

  1. Install Jenkins as described in the Jenkins Wiki

  2. Install a Maven runtime in Jenkins via Manage > Configure > Maven > Maven installation > Choose auto installation

  3. Create a new Jenkins Job. Select Maven-Project as job style.

  4. Provide a link to the source code of the Axon Ivy Project in the Source-Code-Management section

  5. Configure the goals clean verify in the Build section

  6. Save the Job and Run it