<!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;">
How to Build JBoss Tools with Maven 3
</h3>
<span style="margin-bottom: 10px;">
created 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-16604">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p><em><strong>This article is a replacement for its precursor, <a class="" href="http://community.jboss.org/docs/DOC-15513">How to Build JBoss Tools 3.2 with Maven 3</a>.</strong></em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong style="font-size: 12pt;"> </strong>To run a local build of JBoss Tools 3.3 against the new Eclipse 3.7-based Target Platform, I suggest a three-step approach:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>a) build the parent & target platform poms (v0.0.3-SNAPSHOT)</p><p>b) resolve the target platform to your local disk</p><p>c) build against your local copy of the target platform</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Once (a) and (b) are done, you need only perform (c) iteratively until you're happy (that is, until everything compiles). This lets you test changes locally before committing back to SVN.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>(a) and (b) need only be done when the parent pom and Target Platform (TP) change. Of course if we get these published to nexus then you may not need those first bootstrapping steps. Stay tuned - work in progress.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>a) build the parent & target platform poms (v0.0.3-SNAPSHOT)</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> cd ~/</p><p><span> svn co </span><a class="jive-link-external-small" href="http://svn.jboss.org/repos/jbosstools/branches/3.3.indigo/" target="_blank">http://svn.jboss.org/repos/jbosstools/branches/3.3.indigo/</a></p><p> cd ~/3.3.indigo/build/parent</p><p> mvn3 clean install</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>b) resolve the target platform to your local disk</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>There are two ways to do this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>i) Download and unpack the latest TP zip</p><p>ii) Resolve the TP using Maven or Ant</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em>i) Download and unpack the latest TP zip</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>You can either download the TP as a zip [5] and unpack it into some folder on your disk. For convenience, you might want to unzip into ~/3.3.indigo/build/target-platform/REPO/, since that's where the Maven or Ant process will by default operate.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>[5] </span><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/e37M5-wtp33M5.target.zip" target="_blank">http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo/e37M5-wtp33M5.target.zip</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><em>ii) Resolve the TP using Maven or Ant</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> cd ~/3.3.indigo/build/target-platform</p><p> mvn3 clean install -Pget.local.target</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>The get.local.target profile will resolve the target platform file, multiple.target, as a p2 repository on your local disk in ~/3.3.indigo/build/target-platform/REPO/. It may take a while, so you're better off from a speed point-of-view simply fetching the latest zip [5]. However, if you want to see what actually happens to create the TP (as done in Hudson) this is the approach to take.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Since the Maven profile is simply a wrapper call to Ant, you can also use Ant 1.7.1 or later directly:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> cd ~/3.3.indigo/build/target-platform</p><p> ant</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Should you want to build the JBDS target, do this:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> cd ~/3.3.indigo/build/target-platform</p><p> ant jbds</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Then you'll get a p2 repo in ~/3.3.indigo/build/target-platform/JBDS_REPO/.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>c) build against your local copy of the target platform</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p> cd ~/3.3.indigo/build/</p><p> mvn3 clean install -U -B -fae -e -Plocal.site -Dlocal.site=file:/${HOME}/3.3.indigo/build/target-platform/REPO/ | tee build.all.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>If you downloaded the zip and unpacked is somewhere else, use -Dlocal.site=file:/.../ to point at that folder instead.</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-16604">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>