JBoss Community

JBoss Tools Target Platform Provisioning (or, how to resolve missing dependencies when compiling JBoss Tools)

modified by Nick Boldt in JBoss Tools Development - View the full document

This document is a work in progress and subject to change.

 

In order to build JBoss Tools in your workspace (or on your local machine, if not in Eclipse), you need to have its dependencies available. There are a number of ways to accomplish this, depending on your needs and how much manual effort you'd like to expend.

 

First, you'll need the JBoss Tools sources on disk. Fetch sources from trunk (or another branch) into ~/tru (or another location on disk).

 

svn co http://anonsvn.jboss.org/repos/jbosstools/trunk/ ~/tru

 

Next, you can either install the target platform update site into your Eclipse install, or simply let Tycho fetch all the dependencies into a local m2 cached repository.

 

------------------------------


OPTION 1: Let Tycho Resolve Dependencies From Remote Repo Into Local Cache

 

In this case, you don't even need Eclipse installed - you just need the sources on disk.

 

You will of course need Maven 3 installed.

 

a) Build parent + target platform poms (should only take a few mins; includes 18M of downloaded artifacts into your local Maven cache, eg., ~/.m2).

 

cd ~/tru/build; mvn3 clean install -f parent/pom.xml


b) Build one or more components (when done, ~/.m2 will be 1.1G in size):

 

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -P helios-remote-target

or

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -P helios-remote-target -P seam-bootstrap

 

The 'helios-remote-target' will fetch the latest dependencies from this update site:

 

http://download.jboss.org/jbosstools/updates/target-platform/latest/

 

If you omit the 'helios-remote-target' profile, you will instead use unified.target to resolve specific versions of features/plugins, rather than the lastest available.

 

If you install m2eclipse, you can also start mvn3 builds from within Eclipse.

 

------------------------------


OPTION 2: Let Tycho Resolve Dependencies From Local Repo Into Local Cache


If have a local Target Platform repo already mirrored on disk (for example, you downloaded a zip of the above update site and unpacked it somewhere, you can use the 'helios-local-target' profile.

 

You will of course need Maven 3 installed.

 

a) Edit the parent/pom.xml to point to the correct path on disk, and rebuild it. (The default path is the one that Hudson uses.)

 

vi parent/pom.xml # search for 'helios-local-target'

mvn3 clean install -f parent/pom.xml

 

b) Build using the 'helios-local-target' profile you modified to point to the correct location on your disk.

 

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -P helios-local-target

or

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -P helios-local-target -P seam-bootstrap

 

This is how the Hudson builds run: compile the parent & target platform pom.xml files, then build the desired component(s) against a locally available update site.

 

If you omit the 'helios-local-target' profile, you will instead use unified.target to resolve specific versions of features/plugins, rather than the lastest available.

 

If you install m2eclipse, you can also start mvn3 builds from within Eclipse.

 

------------------------------

 

OPTION 3: (DEPRECATED) Install Target Platform Update Site into Eclipse

 

Point the latest Eclipse 3.6.x build at the Target Platform update site (generated from this e361-wtp322.target file). Be sure to show uncategorized features, then install everything.

 

http://download.jboss.org/jbosstools/updates/target-platform/latest/

 

After restarting Eclipse, you should have all the dependencies installed to develop JBoss Tools; however, if you want to use this Eclipse as the target platform against which to build using Tycho, you need to also unzip the latest deltapack (eg., eclipse-M20101020-0925-delta-pack.zip) into your Eclipse root folder. Once you've done that, you can use the following commands to tell Maven (and Tycho) to use that Eclipse instead of doing its own resolution.

 

You will of course need Maven 3 installed.

 

a) Build parent + target platform poms (should only take a few mins; includes 18M of downloaded artifacts into your local Maven cache, eg., ~/.m2).

 

cd ~/tru/build; mvn3 clean install -f parent/pom.xml


b) Build all components or use the bootstrap profiles in build/pom.xml to build a stack of components, such as Seam:

 

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -Dtycho.targetPlatform=/path/to/your/eclipse

or

cd ~/tru/build; mvn3 clean install -U -B -e -fae -Dmaven.test.skip -Dtycho.targetPlatform=/path/to/your/eclipse -P seam-bootstrap

 

Note that if you install m2eclipse, you can also start mvn3 builds from within Eclipse.

 

Note that the use of -Dtycho.targetPlatform= is DEPRECATED and is planned to be removed from a future release of Tycho.

 

------------------------------


For other ways to build, see http://community.jboss.org/wiki/HowtoBuildJBossToolswithMaven3

 


Checking the Target Platform To See What's There

There are three ways to see what's already in the Target Platform. (This can be useful if you're checking to see if something's already there or needs to be added.)

 

Option 1:

 

1. In Eclipse, go to Help->Install New Software...

2. Provide the URL: http://download.jboss.org/jbosstools/updates/target-platform/latest/

3. Click Add and give it a useful name such as "Current JBoss Tools Target Platform"

4. Browse the list of features. Note that you may have to uncheck the "Group Items By Category" checkbox.

 

Option 2:

 

Explore the file http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target or http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target in an XML editor or Eclipse's Target Platform editor

 

Option 3:

 

Explore the file http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target.p2mirror.xml or http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target.p2mirror.xml. This file is the same as its matching target file but as an Ant script. It does not contain feature/plugin versions, just repo URLs and a list of IUs (feature.group == feature + contained plugins). It is therefore instructions for how to download the contents of the .target file onto your local disk. You can run it using `ant -f multiple.target.p2mirror.xml` or using the build.xml script in the same folder.

Comment by going to Community

Create a new document in JBoss Tools Development at Community