Denis Golovin [
http://community.jboss.org/people/dgolovin] modified the blog post:
"How to Build JBoss Tools with Maven3"
To view the blog post, visit:
http://community.jboss.org/community/jbosstools/blog/2010/06/27/how-to-bu...
--------------------------------------------------------------
[Note: This blog were meant to be a wiki page, keeping this for prosperity but the right
place to read/comment/edit is in the
http://community.jboss.org/docs/DOC-15513 wiki]
Current trunk version of JBoss Tools can be built with maven 3 and make it faster and
easier for everyone.
h2. 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)
h2. Environment Setup
h3. 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"
h3. 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
h2. 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.
h3. 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
h3. 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.
h3. 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
--------------------------------------------------------------
Comment by going to Community
[
http://community.jboss.org/community/jbosstools/blog/2010/06/27/how-to-bu...]