IIB Maven plugin

Introduction

This plugin is an upgrade of the existing IIB9 plugin provided by Vadosity LLC (in particular Brett Shelley, who did an incredible job on both documenting and updating the previous incarnation, produced by SBB which is still available from github). The upgrade was developed in collaboration with our partners at Syntegrity Solutions. It is an open source project available from github

The upgrade was required for IIB Version 10, in particular to support both Shared Libraries and Linux users. However, whilst we were changing that we also added another option to simplify the usage to suit smaller projects or project teams. So the bulk of this page is dedicated to how to use this more simplified approach. For larger projects and/or project teams consult the main documentation, referenced below. Please note that the mavenize process, described here and by Vadosity, can be repeated a number of times so you are not forced to use one approach. You may find over time that you can vary the approach taken depending on your own project needs and collaborations. We aim to make this plugin as flexible as possible.

Whilst the original plugin was aimed at Windows users, we have now added support for Linux users (by incorporating Java exec by Alvin Alexander). Linux users are the focus for this page. Rest assured, Windows users are still supported but you will have to tailor the provided commands for your own usage and environment.

Getting started

The aim of this process is to provide a simple build profile for workspaces that contains a mix of Applications, Shared Libraries, Libraries & Java projects. The IIB dependencies will remain within the workspace (which could, or rather should, be included in a source repository). The plugin will generate .bar files for all Application & Shared Library projects and provide an override for a provided set of target environments. It will also enable local integration testing and well as publishing of the .bar files.

Quick Start

This guide should get you up and running.

  1. Install maven
  2. Add the plugin repository to either your local environment (~/.m2/settings.xml) or your configured repository (nexus or artifactory or ...), the plugin is available from http://www.vadosity.com:8081/nexus/content/repositories/snapshots/
  3. Install the IBM provided IntegrationAPI.jar either into your local environment or your 3rd party/external provided jars if you have a local respository manager. The plugin uses the following dependency (which must be made available prior to running the plugin):
    <dependency>
        <groupId>com.ibm.broker</groupId>
        <artifactId>IntegrationAPI</artifactId>
        <version>10.0.0.6</version>
    </dependency>
  4. Mavenize an IIB v10 workspace (do this just per IIB v10 workspace). With a command window or terminal, navigate to the root of an existing workspace, modify and execute this example command:
    mvn -DiibDependenciesLocal=true -Doverwrite=true -Dmqsiprofile=/opt/ibm/iib-10.0.0.6/server/bin/mqsiprofile \
        -DgroupId=<your.group.id> -Dversion=<your.version> -Ddistribution.repository=<your.local.repo> \
        ch.sbb.maven.plugins:iib-maven-plugin:10.0-SNAPSHOT:mavenize
    You should see a pom.xml file in the workspace root and for each Application and Shared Library.
  5. Compile the .bar files using the command
    mvn compile
    You can restrict which are built by the using the reactor list on the command line such as
    mvn compile -pl myapp1,myshlib1
    The .bar files will appear in the target directory generated for each project.
  6. Set up the localdev environment. You will see for each pom.xml generated, there will also be a directory called src/main/resources. In this folder there will be a file called localdev.deploy-config. Modify this file to define the local Integration node and server that this project will be deployed to. Also there will be a file called localdev.properties. This is used to override properties before being deployed. Modify to add any required local properties.
  7. Deploy to the local environment run the command
    mvn pre-integration-test
    This will compile the bar files, again, apply override properties and deploy to the localdev environment. You can skip the compile as follows
    mvn -DskipTo=pre-integration-test pre-integration-test
  8. To run integration tests, use
    mvn integration-test
  9. Finally publish the generated .bar files to you local repository. Run
    mvn deploy
    You can skip the other steps by using the command
    mvn -DskipTo=deploy deploy
    If this was successful, you should see the .bar files in your configured repository as well as the .bar files with overrides applied for each configured target environment.

Further Considerations

  • The target environments are required for each .bar file project. This is very flexible and allows for a mixed deployment. However, where all .bar files are being deployed to a single environment, we created the .deploy-broker files in a deploy directory and used softlinks rather than have multiple copies.

Further Documentation

To explore the richer set of features offered by this plugin, please visit Vadosity Maven