[jboss-dev-forums] [JBoss Tools Development] - JBoss Tools Target Platform Provisioning (or, how to resolve missing dependencies when compiling JBoss Tools)
Nick Boldt
do-not-reply at jboss.com
Thu Oct 21 16:10:59 EDT 2010
Nick Boldt [http://community.jboss.org/people/nickboldt] modified the document:
"JBoss Tools Target Platform Provisioning (or, how to resolve missing dependencies when compiling JBoss Tools)"
To view the document, visit: http://community.jboss.org/docs/DOC-15755
--------------------------------------------------------------
*+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/ 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: Install Target Platform Update Site into Eclipse*
Point the latest Eclipse 3.6.x build at the http://download.jboss.org/jbosstools/updates/target-platform/latest/ Target Platform update site (generated from this http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/e361-wtp322.target e361-wtp322.target file). Be sure to show uncategorized features, then install everything.
http://download.jboss.org/jbosstools/updates/target-platform/latest/ 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 http://http//download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php#DeltaPack 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 http://maven.apache.org/download.html 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 http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml parent/pom.xml
b) Build all components or use the bootstrap profiles in http://anonsvn.jboss.org/repos/jbosstools/trunk/build/pom.xml 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 http://m2eclipse.sonatype.org/ m2eclipse, you can also start mvn3 builds from within Eclipse.
*------------------------------*
*
*
*OPTION 2: 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 http://maven.apache.org/download.html 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 http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml 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,helios-remote-target*
*or*
cd ~/tru/build; mvn3 clean install +-U -B -e -fae -Dmaven.test.skip+** *-P \!helios,helios-remote-target* *+-P seam-bootstrap+*
The 'helios-remote-target' will fetch all dependencies from this update site:
http://download.jboss.org/jbosstools/updates/target-platform/latest/ http://download.jboss.org/jbosstools/updates/target-platform/latest/
*------------------------------*
*
*
*OPTION 3: Let Tycho Resolve Dependencies From Local Repo Into Local Cache*
*
*
** If have a local Target Platform repo already mirrored on disk (for example, you http://download.jboss.org/jbosstools/updates/target-platform/ 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 http://maven.apache.org/download.html Maven 3 installed.
a) Edit the http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml 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,helios-local-target *
*or+
+*
cd ~/tru/build; mvn3 clean install +-U -B -e -fae -Dmaven.test.skip+ *-P \!helios,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.
*------------------------------*
Note that if you install http://m2eclipse.sonatype.org/ m2eclipse, you can also start mvn3 builds from within Eclipse.
For other ways to build, see http://community.jboss.org/docs/DOC-15513 http://community.jboss.org/wiki/HowtoBuildJBossToolswithMaven3
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-15755]
Create a new document in JBoss Tools Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20101021/990748ab/attachment.html
More information about the jboss-dev-forums
mailing list