A Jazz-based Maven Build with IBM Rational Team Concert v4 Using Jazz Hub
The delivery of the lecture by the very enthusiastic, energetic and knowledgable Ashley Maher is still underway. It's the first of its kind at UOW using Jazz Hub.
I've documented my experience in setting up Maven based build with Jazz Hub hosting RTC v4 and would like to share this recipe here for all interested.
Some crucial prerequisites
- You have an existing Maven project that successfully builds., e.g. with Maven command line utility (which you need to have installed separately)
- You’ve installed the IBM Rational Team Concert (RTC) client
- You’ve installed the Build System Toolkit (on your machine or another build machine) [it’s a separate download to RTC from Jazz.net site]
- From your RTC client, you are able to login to a Jazz Team Server (JTS) where you are a member of an existing project and team area
Follow the steps in reference 1) below to set up builds with Maven in RTC.
1) Jazz.net wiki on Maven build with RTC (Jazz)
2) Creating build definitions in Help (Infocenter)
3) Jazz Team Build Frequently Asked Questions
4) Further read on ‘when Maven meets RTC’
5) Maven and Jazz
Here are some additional notes on setting up Maven build within RTC
- The Build System Toolkit needs to be downloaded for the platform you will run the build on. The download is from the same area in Jazz.net as the server and client software.
- In my case, on my Mac OS X client I installed RTC v4 in the folder structure as in the screenshot below. Note the folder ”buildsystem” I copied to the same RTC4 folder. It doesn’t need to be there but it seems convenient to keep it there.
- In my RTC project area, I created a build definition by selecting Builds under the project area name, right-click and ‘New Build Definition…’, then follow the wizard.
- Make sure to select ‘Maven - Jazz Build Engine’ from the list of ‘Available build templates’.
- In pre-build, select Jazz Source Control.
When setting up properties of the build definition, fill in the following info.
- Overview: add ‘engine1’ as a new engine of type ‘Jazz Build Engine’. Give it a unique name that will identify your build machine.
- Maven: ‘Project location’ is where pom.xml file is, this is the location in my RTC workspace (sandbox) on my laptop where all components are loaded locally from the Repository Workspace. You need to specify, which Maven goals to reach during the build — this is the ‘Goals’ field. In my case, I put in “clean install” as these goals. And ‘Maven home’ is where I have installed Maven (command line utility) on my laptop [this is a separate step that was required earlier].
- Jazz Source Control: need to point at the Repository Workspace to use. Observe the following important note about ownership of the selected workspace as pictured in the screenshot below:
Then need to indicate a folder where the build will be happening (‘Load directory’) on the build machine (in this case on my laptop) — this folder will be created as part of the build. Also note the two checkboxes selected.
- Finally note that 16 components have been excluded, only ‘core’ module is selected for building (the only one not excluded). You need to make the right choice based on the component you’d like to build.
- Before requesting a build, need to start the build engine at a terminal window. In my case it looks like in the screenshot below. Here is the directory where I will start from.
- And this is the command I will execute:
- Note that the “userId” and “pass” parameters are my login credentials to Jazz.net and Jazz Hub where my project is hosted. And note the “engineId” being the same build engine I created in the step above.
- Once the configuration is saved the build may be requested. Right-click on the build name … Note that you should select the ‘Build Engine=engine1’ and you have an option to run the build as the ‘Personal Build’ as per the screenshot below.
- Here is an example of build report in the next three screenshots that follow. In this example, the build completed with errors as per the screenshots. It’s a ‘success’ at the end as it shows that some tests failed (in this case for the openmrs-api module.)
Senior Managing Consultant
IBM SWG Services Rational Australia