[Note: This blog has been replaced by a more up to date How to Build JBoss Tools 3.2 with Maven 3.]

 

Current trunk version of JBoss Tools can be built with maven 3 and make it faster and easier for everyone.

Prerequisites

  1. Java 1.6 SDK
  2. Maven 3.beta1
  3. About 6 GB of free disk space if you want to run all integration tests for (JBoss AS, Seam and Web Services Tools)
  4. subversion client 1.6.X (should work with lower version as well)

Environment Setup

Maven and Java

Make sure your maven 3 is available by default and Java 1.6 is used.

 

mvn -version

 

should print out something like

 

Apache Maven 3.0-alpha-7 (r921173; 2010-03-09 14:31:07-0800)
Java version: 1.6.0_18
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-22-generic-pae" arch: "i386" Family: "unix"

Sources

Checkout sources from anonymous SVN like

 

svn co https://svn.jboss.org/repos/jbosstools/trunk jbosstools-src

 

This will take some time dependent on your bandwidth

Build Strategies

All commands below is assuming that commands are executed in jbosstools-src folder after sources checked out as it suggested above.

There are several strategies to chose from building everything to build particular component or part of it like all plug-ins, all tests, all features, particular plugin/feature.

 

Target platform should be built first like

 

$mvn -f build/target-platform/pom.xml

 

If you want to just compile the modules, tests can be skipped by adding system property -Dmaven.test.skip=true and you should be able to faster verify compile issues.

Build/Test Everything

Current version cannot be build without local changes because of problem with with drools component, so to go with this scenario you need to remove drools references from pom.xml and site/site.xml. After that to build/test everything use:

 

$mvn clean install

Build/Test Particular Component with Dependencies

For convenience there are aggregator projects defined for each component. It provides a simple way to build/test components with dependencies.

 

$mvn clean install -f build/component/${component.name}.xml

 

where ${component.name} is component you want to build/test. Currently build/component folder contains aggregator projects for:

  1. tests,
  2. jmx,
  3. archives,
  4. as,
  5. common,
  6. seam

 

more is coming soon.

Build/Test Single Component

Be aware that to get this work all dependencies for this component must be installed in maven repo. It can be done by build everything first or by build component and its dependencies using aggregated project as it explained above. You can skip tests for this build and then enable them back when you run single component build.

To build single component use pom.xml in component's folder like it is shown below.

 

$mvn clean install -f ${component.name}/pom.xml

 

where ${component.name} is component's root folder name. For instance to build jmx component use command below

 

$mvn clean install -f jmx/pom.xml