<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    JBoss Tools Target Platform Provisioning (or, how to resolve missing dependencies when compiling JBoss Tools)
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/nickboldt">Nick Boldt</a> in <i>JBoss Tools Development</i> - <a href="http://community.jboss.org/docs/DOC-15755">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p><span style="color: #ff0000;"><strong><em>This document is a work in progress and subject to change.</em></strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>First, you'll need the JBoss Tools sources on disk. Fetch sources from trunk (or another branch) into ~/tru (or another location on disk).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">svn co <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/" target="_blank">http://anonsvn.jboss.org/repos/jbosstools/trunk/</a> ~/tru</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>------------------------------</strong></p><p><strong><br/></strong></p><p><strong>OPTION 1: Let Tycho Resolve Dependencies From Remote Repo Into Local Cache<br/></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>In this case, you don't even need Eclipse installed - you just need the sources on disk.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You will of course need <a class="jive-link-external-small" href="http://maven.apache.org/download.html">Maven 3 installed</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>a) Build parent + target platform poms (should only take a few mins; includes 18M of downloaded artifacts into your local Maven cache, eg., ~/.m2).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install -f <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml">parent/pom.xml </a></p><p><br/> b) Build one or more components (when done, ~/.m2 will be 1.1G in size):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em> <span style="color: #339966;"><strong>-P helios-remote-target</strong></span></p><p style="padding-left: 60px;"><strong> or</strong></p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em><strong> </strong><span style="color: #339966;"><strong>-P helios-remote-target</strong></span> <strong><em>-P seam-bootstrap</em></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The 'helios-remote-target' will fetch the latest dependencies from this update site:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;"><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform/latest/">http://download.jboss.org/jbosstools/updates/target-platform/latest/</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you omit the 'helios-remote-target' profile, you will instead use <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target">unified.target</a> to resolve specific versions of features/plugins, rather than the lastest available.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you install <a class="jive-link-external-small" href="http://m2eclipse.sonatype.org/">m2eclipse</a>, you can also start mvn3 builds from within Eclipse.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>------------------------------</strong></p><p><strong><br/></strong></p><p><strong>OPTION 2: Let Tycho Resolve Dependencies From Local Repo Into Local Cache</strong></p><p><strong><br/></strong></p><p><strong> </strong>If have a local Target Platform repo already mirrored on disk (for example, you <a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform/">downloaded a zip of the above update site</a> and unpacked it somewhere, you can use the 'helios-local-target' profile.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You will of course need <a class="jive-link-external-small" href="http://maven.apache.org/download.html">Maven 3 installed</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>a) Edit the <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml">parent/pom.xml</a> to point to the correct path on disk, and rebuild it. (The default path is the one that Hudson uses.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">vi parent/pom.xml # search for 'helios-local-target'</p><p style="padding-left: 30px;">mvn3 clean install -f parent/pom.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>b) Build using the 'helios-local-target' profile you modified to point to the correct location on your disk.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em> <span style="color: #339966;"><strong>-P helios-local-target <span style="color: #000000;"> </span></strong></span></p><p style="padding-left: 60px;"><span style="color: #339966;"><strong style="color: #000000; ">or<em><br/></em></strong></span></p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em> <strong><span style="color: #339966;">-P helios-local-target</span> <em>-P seam-bootstrap</em></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is how the Hudson builds run: compile the parent &amp; target platform pom.xml files, then build the desired component(s) against a locally available update site.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you omit the 'helios-local-target' profile, you will instead use <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target">unified.target</a> to resolve specific versions of features/plugins, rather than the lastest available.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you install <a class="jive-link-external-small" href="http://m2eclipse.sonatype.org/">m2eclipse</a>, you can also start mvn3 builds from within Eclipse.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>------------------------------</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>OPTION 3: (DEPRECATED) Install Target Platform Update Site into Eclipse</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Point the latest Eclipse 3.6.x build at the <a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform/latest/">Target Platform update site</a> (generated from this <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/e361-wtp322.target">e361-wtp322.target</a> file). Be sure to show uncategorized features, then install everything.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;"><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform/latest/">http://download.jboss.org/jbosstools/updates/target-platform/latest/</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 <a class="jive-link-external-small" href="http://http//download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/index.php#DeltaPack">deltapack</a> (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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You will of course need <a class="jive-link-external-small" href="http://maven.apache.org/download.html">Maven 3 installed</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>a) Build parent + target platform poms (should only take a few mins; includes 18M of downloaded artifacts into your local Maven cache, eg., ~/.m2).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install -f <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/parent/pom.xml">parent/pom.xml</a></p><p><br/> b) Build all components or use the bootstrap profiles in <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/pom.xml">build/pom.xml</a> to build a stack of components, such as Seam:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em> <strong>-Dtycho.targetPlatform=/path/to/your/eclipse</strong></p><p style="padding-left: 60px;"><strong style="color: #000000;"> or</strong></p><p style="padding-left: 30px;">cd ~/tru/build; mvn3 clean install <em>-U -B -e -fae -Dmaven.test.skip</em><strong> -Dtycho.targetPlatform=/path/to/your/eclipse</strong><strong><em> -P seam-bootstrap</em></strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Note that if you install <a class="jive-link-external-small" href="http://m2eclipse.sonatype.org/">m2eclipse</a>, you can also start mvn3 builds from within Eclipse.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Note that the use of <strong style="color: #ff0000;">-Dtycho.targetPlatform=</strong> is <strong>DEPRECATED</strong> and is planned to be removed from a future release of Tycho.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong>------------------------------</strong></p><p><strong><br/></strong></p><p>For other ways to build, see <a class="jive-link-wiki-small" href="http://community.jboss.org/docs/DOC-15513">http://community.jboss.org/wiki/HowtoBuildJBossToolswithMaven3</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2><br/>Checking the Target Platform To See What's There</h2><p>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.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Option 1:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1. In Eclipse, go to Help-&gt;Install New Software...</p><p>2. Provide the URL: <a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform/latest/">http://download.jboss.org/jbosstools/updates/target-platform/latest/</a></p><p>3. Click Add and give it a useful name such as "Current JBoss Tools Target Platform"</p><p>4. Browse the list of features. Note that you may have to uncheck the "Group Items By Category" checkbox.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Option 2:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Explore the file <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target"><span>http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target</span></a> or <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target"><span>http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target</span></a> in an XML editor or Eclipse's Target Platform editor</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Option 3:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Explore the file <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target.p2mirror.xml"><span>http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/multiple.target.p2mirror.xml</span></a> or <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target.p2mirror.xml"><span>http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/unified.target.p2mirror.xml</span></a>. 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 <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/build.xml">build.xml</a> script in the <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/target-platform/">same folder</a>.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-15755">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss Tools Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>