<!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="https://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;">
    modified by <a href="https://community.jboss.org/people/nickboldt">Nick Boldt</a> in <i>JBoss Tools Development</i> - <a href="https://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><div class="toc" style="border: 1px dashed black; padding: 10px;"><ul><ul><li>
<a class="jive-link-anchor-small" href="#Environment_Setup">Environment Setup</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Prerequisistes">Prerequisistes</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Maven_and_Java">Maven and Java</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Maven_settings">Maven settings</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Maven__Java_Memory_Configuration">Maven &amp; Java Memory Configuration</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#About_Target_Platform_and_related_profiles">About Target Platform and related profiles</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Getting_a_local_copy_of_the_Target_Platform_Recommanded">Getting a local copy of the Target Platform (Recommanded)</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Set_up">Set up</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#_Download_TP_as_a_zip_and_install_it_by_yourself"> Download TP as a zip and install it by yourself</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#OR_use_MavenAnt_to_get_it">OR, use Maven+Ant to get it</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Use">Use</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Or_resolving_remotely_with_the_Unified_Target_Platform">Or resolving remotely with the Unified Target Platform</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Optional_Build_parent_and_target_platform">(Optional) Build parent and target platform</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Building_Everything_In_One_Build_Locally_Via_Commandline">Building Everything In One Build Locally Via Commandline</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Building_Individual_Components_Locally_Via_Commandline">Building Individual Components Locally Via Commandline</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Build_a_component_resolving_to_a_recent_aggregation_build_for_other_JBT_dependencies_Recommanded">Build a component resolving to a recent aggregation build for other JBT dependencies (Recommanded)</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Build_a_component_resolving_to_the_latest_CI_builds_for_other_JBT_dependencies">Build a component resolving to the latest CI builds for other JBT dependencies</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Build_a_component_along_with_all_its_dependencies_from_sources_bootstrap_build">Build a component along with all its dependencies from sources ("bootstrap" build)</a>
</li>
</ul><li>
<a class="jive-link-anchor-small" href="#Building_Locally_In_Eclipse">Building Locally In Eclipse</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Installation_Testing__making_sure_your_stuff_can_be_installed_">Installation Testing - making sure your stuff can be installed </a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Adding_a_new_feature_or_plugin_to_an_existing_component">Adding a new feature or plugin to an existing component</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Tips_and_tricks_for_making_BOTH_PDE_UI_and_headless_Maven_builds_happy">Tips and tricks for making BOTH PDE UI and headless Maven builds happy</a>
</li>
<ul><li>
<a class="jive-link-anchor-small" href="#Check_your_buildproperties">Check your build.properties</a>
</li>
<li>
<a class="jive-link-anchor-small" href="#Check_your_manifestmf_dependencies">Check your manifest.mf dependencies</a>
</li>
</ul></ul></ul></div></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em><strong>This article is a replacement for its precursor, <a class="jive-link-wiki-small" href="https://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;">&#160;</p><p><em><strong>Note that this article only discusses building from trunk. If you need to build from a branch, or switch between branches and/or trunk, see </strong><a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-17497"><strong>How to Build JBoss Tools With Maven3 - Working With Branches</strong></a></em><strong>.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong><em>Looking for how to build our documentation? See </em><a class="" href="https://community.jboss.org/docs/DOC-13341">Building JBoss Tools Documentation</a>.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2 id="Environment_Setup">Environment Setup</h2><h3 id="Prerequisistes">Prerequisistes</h3><ol><li>Java 1.6 SDK</li><li>Maven 3.0.3</li><li>About 6 GB of free disk space if you want to run all integration tests for (JBoss AS, Seam and Web Services Tools) - <span style="color: #ff0000;"><strong>requires VPN access</strong></span></li><li>subversion client 1.6.X&#160; (should work with lower version as well, but newer versions may not work as expected)</li></ol><h3 id="Maven_and_Java">Maven and Java</h3><p>Make sure your maven 3 is available by default and Java 1.6 is used.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive_text_macro jive_macro_code"> mvn -version</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>should&#160; print out something like</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive_text_macro jive_macro_code"><p><strong>Apache Maven 3.0.3</strong> (r1075438; 2011-02-28 12:31:09-0500)</p><p><strong>Java version: 1.6.0_25</strong>, vendor: Sun Microsystems Inc.</p><p><strong>Java home: /usr/java/jdk1.6.0_25/jre</strong></p><p>Default locale: en_US, platform encoding: UTF-8</p><p>OS name: "linux", version: "2.6.42.3-2.fc15.x86_64", arch: "amd64", family: "unix"</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Maven_settings">Maven settings</h3><p>Follow<a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-15170"> these instructions</a> to add reference to JBoss Repositories into your settings.xml. You'll also probably need access to the SNAPSHOT repository. So here is what you should see in your ~/.m2/settings.xml</p><p><span><br/></span></p><pre class="jive-pre"><code class="jive-code jive-xml">
<span class="jive-xml-tag"><span>&lt;settings xmlns="</span><a class="jive-link-external-small" href="http://maven.apache.org/SETTINGS/1.0.0" target="_blank">http://maven.apache.org/SETTINGS/1.0.0</a><span>" xmlns:xsi="</span><a class="jive-link-external-small" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a><span>" xsi:schemaLocation="</span><a class="jive-link-external-small" href="http://maven.apache.org/SETTINGS/1.0.0" target="_blank">http://maven.apache.org/SETTINGS/1.0.0</a><span> </span><a class="jive-link-external-small" href="http://maven.apache.org/xsd/settings-1.0.0.xsd" target="_blank">http://maven.apache.org/xsd/settings-1.0.0.xsd</a><span>"&gt;</span></span>
&#160;&#160; ....
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;profiles&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ....
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;profile&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;id&gt;</span>jboss-default<span class="jive-xml-tag">&lt;/id&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;repositories&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-comment">&lt;!-- To resolve parent artifact --&gt;
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;repository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;id&gt;</span>jboss-public-repository-group<span class="jive-xml-tag">&lt;/id&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;name&gt;</span>JBoss Public Repository Group<span class="jive-xml-tag">&lt;/name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;url&gt;</span><a class="jive-link-external-small" href="http://repository.jboss.org/nexus/content/groups/public/" target="_blank">http://repository.jboss.org/nexus/content/groups/public/</a><span class="jive-xml-tag">&lt;/url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/repository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;repository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;id&gt;</span>jboss-snapshots-repository<span class="jive-xml-tag">&lt;/id&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;name&gt;</span>JBoss Snapshots Repository<span class="jive-xml-tag">&lt;/name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;url&gt;</span><a class="jive-link-external-small" href="https://repository.jboss.org/nexus/content/repositories/snapshots/" target="_blank">https://repository.jboss.org/nexus/content/repositories/snapshots/</a><span class="jive-xml-tag">&lt;/url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/repository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/repositories&gt;</span>

&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pluginRepositories&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- To resolve parent artifact --&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pluginRepository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;id&gt;</span>jboss-public-repository-group<span class="jive-xml-tag">&lt;/id&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;name&gt;</span>JBoss Public Repository Group<span class="jive-xml-tag">&lt;/name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;url&gt;</span>http://repository.jboss.org/nexus/content/groups/public/<span class="jive-xml-tag">&lt;/url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pluginRepository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;pluginRepository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;id&gt;</span>jboss-snapshots-repository<span class="jive-xml-tag">&lt;/id&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;name&gt;</span>JBoss Snapshots Repository<span class="jive-xml-tag">&lt;/name&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;url&gt;</span>https://repository.jboss.org/nexus/content/repositories/snapshots/<span class="jive-xml-tag">&lt;/url&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pluginRepository&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/pluginRepositories&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/profile&gt;</span>
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/profiles&gt;</span>

&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activeProfiles&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span class="jive-xml-tag">&lt;activeProfile&gt;</span>jboss-default<span class="jive-xml-tag">&lt;/activeProfile&gt;</span>
&#160;&#160;&#160;&#160;&#160;&#160;&#160; ...
&#160;&#160;&#160; <span class="jive-xml-tag">&lt;/activeProfiles&gt;</span>
<span class="jive-xml-tag">&lt;/settings&gt;</span>
 </code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Maven__Java_Memory_Configuration">Maven &amp; Java Memory Configuration</h3><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>To configure the amount of memory used by Maven, you can define MVN_OPTS as follows, either in the mvn / mvn.bat script you use to run Maven, or set as global environment variables. Here's how to do so for <a class="jive-link-external-small" href="http://forums.fedoraforum.org/showthread.php?t=262465">Fedora</a>, <a class="jive-link-external-small" href="https://help.ubuntu.com/community/EnvironmentVariables">Ubuntu</a>, <a class="jive-link-external-small" href="http://forums.techarena.in/windows-xp-support/1152405.htm">Windows</a>, <a class="jive-link-external-small" href="http://www.digitaledgesw.com/node/31">OSX</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive_text_macro jive_macro_wiki"><p>{code}</p><p>set MAVEN_OPTS=-Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=256m</p><p>{code}</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2 id="About_Target_Platform_and_related_profiles">About Target Platform and related profiles</h2><p>The target platform (TP) lists all dependencies (coming from Eclipse.or and other 3rd-party update sites) that are used by JBoss Tools. This target platform is materialized as an Eclipse p2 repository (formerly update-site) that is used during build to resolve dependencies. Target Platform is managed by JBoss Tools people, and only dependencies from this TP are allowed to be used in code.</p><p>If you need a new dependency in the TP, feel free to <a class="jive-link-external-small" href="https://issues.jboss.org/secure/CreateIssueDetails!init.jspa?pid=10020&amp;summary=Add%20[YOUR%20REQ]%20to%20Target%20Platform&amp;components=12310540&amp;issuetype=13&amp;Create=Create">open a ticket to request it</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Here are several ways to build locally using this target platform. It's up to you to choose the one that match your needs:</p><h3 id="Getting_a_local_copy_of_the_Target_Platform_Recommanded">Getting a local copy of the Target Platform (Recommanded)</h3><ul><li>Pros: Speed +++</li><li>Cons: Step to be repeated whenever <a class="jive-link-external-small" href="https://source.jboss.org/browse/JBossTools/trunk/build/target-platform/unified.target">target platform</a> changes</li></ul><h4 id="Set_up">Set up</h4><h5 id="_Download_TP_as_a_zip_and_install_it_by_yourself"> Download TP as a zip and install it by yourself</h5><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>You can either download the TP as a zip and unpack it into some folder on your disk. For convenience, the easiest is to unzip into jbosstools/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;">&#160;</p><p><span>You can get it with a browser or a command line tool such as wget or curl at the following url: </span><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo.SR2/" target="_blank">http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo.SR2/</a><em><strong>&lt;actualFilename&gt;</strong></em>.target.zip</p><p>and then unzip it here (the default path for -Dlocal.site, which means you can call maven with <em><strong>-Plocal.site</strong></em> and not need to pass in <em><strong>-Dlocal.site=file:///path/to/some/other/folder/</strong></em> as well):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p>unzip *.target.zip -d jbosstools/build/target-platform/REPO/</p></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #3366ff;"><strong>(Note that the default path used for &lt;local.site&gt; will change every time a new target platform is released which is a significant change over the previous (eg., SR1, SR2), so if this breaks because the default not points at an empty folder, it's time to get a new TP! Hurray for build-time notification you're using an old target platform!)</strong></span></p><h5 id="OR_use_MavenAnt_to_get_it">OR, use Maven+Ant to get it</h5><p>In that case, you also need Ant 1.8.2 or later<strong>.</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code"> cd jbosstools/build/target-platform
 mvn clean install -Pget.local.target
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The get.local.target profile will resolve the target platform file, multiple.target, as a p2 repository on your local disk in ~/trunk/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;">&#160;</p><p>Since the Maven profile is simply a wrapper call to Ant, you can also use Ant 1.8 or later directly:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre class="jive-pre"><code class="jive-code"> cd jbosstools/build/target-platform
 ant help # show usage instructions
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4 id="Use">Use</h4><p>Just add -<strong>P local.site -Dlocal.site=file:///path/to/target/repository/</strong></p><p><span style="color: #ff6600;"><strong>NOTE: </strong></span>You must specify a path starting with <strong>file:///</strong> (<span style="text-decoration: underline;">three or more slashes</span>) to avoid errors such as "<em>p2.core.ProvisionException URI has an authority component</em>".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Examples </p><p><span style="color: #ff0000;"><strong>LINUX / MAC USERS</strong></span></p><p> cd build</p><p> mvn clean install -U -B -fae -e -<strong>P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/</strong>| tee build.all.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;"><strong>WINDOWS USERS</strong></span></p><p> cd c:\trunk\build</p><p> mvn3 clean install -U -B -fae -e -Plocal.site <strong>-Dlocal.site=file:///C:/trunk/build/target-platform/REPO/</strong> &gt; build.all.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Or_resolving_remotely_with_the_Unified_Target_Platform">Or resolving remotely with the Unified Target Platform</h3><p>unified.target refers to the dependency as published in the Target Platfrom repository. </p><ul><li>Pros: No additional thing to do than invoking Maven</li><li>Cons: Speed ---</li></ul><p>Consume it by adding<strong> <em>-Punified.target</em> </strong>to you Maven invocation command-line</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2 id="Optional_Build_parent_and_target_platform">(Optional) Build parent and target platform</h2><p>This step is only useful if you are actually working on the parent or the target platform and want to test it locally. Otherwise, Maven will simply retrieve parent and TP from <strong><a class="jive-link-external-small" href="https://repository.jboss.org/nexus/content/repositories/snapshots/org/jboss/tools/">JBoss Nexus</a></strong> to perform your build.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This is only necessary when the TP change, prior to 3.3.Beta3</p><pre class="jive-pre">svn co http://svn.jboss.org/repos/jbosstools/trunk jbosstools<br/>cd jbosstools/build/parent<br/>mvn clean install<br/>...<br/>[INFO] Reactor Summary:<br/>[INFO]<br/>[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]<br/>[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]<br/>...</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff6600;"><strong>NOTE: You need not fetch the entire JBoss Tools tree from SVN (or <a class="jive-link-external-small" href="http://divby0.blogspot.com/2011/01/howto-partially-clone-svn-repo-to-git.html">Git</a>). </strong></span></p><p><span style="color: #ff6600;"><strong>Instead, you can just fetch the build/ folder and one or more component folders, then as before, </strong></span></p><p><span style="color: #ff6600;"><strong>build the parent pom. After that, <a class="jive-link-anchor-small" href="#runmavenpercomponent">go into the component folder and run maven there</a>.</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" class="jive_text_macro jive_macro_code"><p> mkdir jbosstools</p><p> cd jbosstools</p><p> svn co <a class="jive-link-external-small" href="http://svn.jboss.org/repos/jbosstools/trunk/" target="_blank">http://svn.jboss.org/repos/jbosstools/trunk/build</a></p><p> svn co <a class="jive-link-external-small" href="http://svn.jboss.org/repos/jbosstools/trunk/" target="_blank">http://svn.jboss.org/repos/jbosstools/trunk/jmx</a></p><p> cd jbosstools/build/parent</p><p> mvn clean install</p><p>...</p><p>[INFO] Reactor Summary:</p><p>[INFO] </p><p>[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]</p><p>[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]</p><p>...</p></pre><p><a class="jive-link-anchor-small" name="download-unpack-TP-zip">#</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2></h2><h2 id="Building_Everything_In_One_Build_Locally_Via_Commandline">Building Everything In One Build Locally Via Commandline</h2><p>Assuming you have a local copy of the target platform in ${HOME}/trunk/build/target-platform/REPO/ (as explained previously:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p> <span style="color: #ff0000;"><strong>LINUX / MAC USERS</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>cd build</p><p> mvn clean install -P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ | tee build.all.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>(tee is a program that pipes console output to BOTH console and a file so you can watch the build AND keep a log.)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><span style="color: #ff0000;"><strong>WINDOWS USERS</strong></span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>cd c:\trunk\build</p><p>mvn3 clean install -P local.site -Dlocal.site=file:///C:/trunk/build/target-platform/REPO/</p><p>&#160;&#160; or</p><p>mvn3 clean install&#160; -Plocal.site -Dlocal.site=file:///C:/trunk/build/target-platform/REPO/ &gt; build.all.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If you downloaded the zip and unpacked is somewhere else, use -Dlocal.site=file:///.../ to point at that folder instead.</p><p><a class="jive-link-anchor-small" name="runmavenpercomponent">#</a></p><h2 id="Building_Individual_Components_Locally_Via_Commandline">Building Individual Components Locally Via Commandline</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Build_a_component_resolving_to_a_recent_aggregation_build_for_other_JBT_dependencies_Recommanded">Build a component resolving to a recent aggregation build for other JBT dependencies (Recommanded)</h3><ul><li>Pros:<ul><li>You build only your component</li><li>You only need source for your component</li><li>Speed to resolve deps: +</li><li>You get generally the latest build for you component</li></ul></li><li>Cons:<ul><li>Takes some time to resolve dependencies on other component</li><li>Can sometimes be out of sync if no build occured recently for a component you rely on and had some important change. More risk to get out of sync than with the staging site.</li></ul></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Tracked by <a class="jive-link-external-small" href="https://issues.jboss.org/browse/JBIDE-11516" target="_blank">https://issues.jboss.org/browse/JBIDE-11516</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong> cd jmx</strong></p><p> mvn clean install -P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ <strong>-Pjbosstools-staging-aggregate</strong></p><h3 id="Build_a_component_resolving_to_the_latest_CI_builds_for_other_JBT_dependencies">Build a component resolving to the latest CI builds for other JBT dependencies</h3><ul><li style="text-align: start;">Pros:<ul><li style="text-align: start;">You build only your component</li><li style="text-align: start;">You only need source for your component</li><li style="text-align: start;">You get generally the latest build for you component</li></ul></li><li style="text-align: start;">Cons<ul><li style="text-align: start;">Takes some time to resolve dependencies on other component</li><li style="text-align: start;">Can sometimes be out of sync if no build occured recently for a component you rely on and had some important change</li><li style="text-align: start;">Speed to resolve deps: -</li></ul></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="text-align: start;">This profile is the one use for CI builds on Hudson.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong> cd jmx</strong></p><p> mvn clean install -P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ <strong>-Pjbosstools-nightly-staging-composite</strong></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Build_a_component_along_with_all_its_dependencies_from_sources_bootstrap_build">Build a component along with all its dependencies from sources ("bootstrap" build)</h3><p>This will build exactly what you have locally</p><ul><li style="text-align: start;">Pros:<ul><li style="text-align: start;">You are sure of the version of sources that is used for your JBT dependencies</li><li style="text-align: start;">You don't loose time in resolving your JBT deps</li></ul></li><li style="text-align: start;">Cons:<ul><li style="text-align: start;">You need sources for your dependencies too</li><li style="text-align: start;">You often build more stuff that what you really want to test</li></ul></li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>cd ~/trunk/build</p><p>mvn clean install&#160; -P local.site,<strong>jmx-bootstrap</strong> -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ | tee build.jmx.log.txt</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a class="jive-link-anchor-small" name="buildInEclipse">#</a></p><h2 id="Building_Locally_In_Eclipse">Building Locally In Eclipse</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>First, you must have installed m2eclipse into your Eclipse (or JBDS). You can install the currently supported version from this update site:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/indigo/">http://download.jboss.org/jbosstools/updates/indigo/</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Next, start up Eclipse or JBDS and do <strong>File &gt; Import</strong> to import the project(s) you already checked out from SVN above into your workspace.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13876/Screenshot.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13876/310-276/Screenshot.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Browse to where you have the project(s) checked out, and select a folder to import pom projects. In this case, I'm importing the parent pom (which refers to the target platform pom). Optionally, you can add these new projects to a working set to collect them in your Package Explorer view.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13877/Screenshot-1.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13877/450-259/Screenshot-1.png </span></a></p><p>Once the project(s) are imported, you'll want to build them. You can either do <strong>CTRL-SHIFT-X,M (Run Maven Build),</strong> or right-click the project and select <strong>Run As &gt; Maven Build</strong>. The following screenshots show how to configure a build job.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>First, on the <strong>Main</strong> tab, set a <strong>Name</strong>, <strong>Goals</strong>, <strong>Profile</strong>(s), and add a <strong>Parameter</strong>. Or, if you prefer, put everything in the <strong>Goals</strong> field for simplicity:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>clean install -U -B -fae -e -Plocal.site -Dlocal.site=file://home/nboldt/tmp/JBT_REPO_Indigo/</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Be sure to check <strong>Resolve Workspace artifacts</strong>, and, if you have a newer version of Maven installed, point your build at that <strong>Maven Runtime</strong> instead of the bundled one that ships with m2eclipse.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13878/Screenshot-2.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13878/450-540/Screenshot-2.png </span></a></p><p>On the <strong>JRE</strong> tab, make sure you're using a 6.0 JDK.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13879/Screenshot-3.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13879/450-538/Screenshot-3.png </span></a></p><p>On the <strong>Refresh</strong> tab, define which workspace resources you want to refresh when the build's done.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13880/Screenshot-4.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13880/450-539/Screenshot-4.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>On the <strong>Common</strong> tab, you can store the output of the build in a log file in case it's particularly long and you need to refer back to it.</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13881/Screenshot-5.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13881/450-542/Screenshot-5.png </span></a></p><p>Click <strong>Run</strong> to run the build.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-46-13882/Screenshot-6.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-46-13882/450-347/Screenshot-6.png </span></a></p><p>Now you can repeat the above step to build any other component or plugin or feature or update site from the JBoss Tools repo. Simply import the project(s) and build them as above.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2 id="Installation_Testing__making_sure_your_stuff_can_be_installed_">Installation Testing - making sure your stuff can be installed </h2><p>Each component, when built, produces a update site zip and an unpacked update site which can be used to install your freshly-built features and plugins into a running Eclipse or JBDS instance.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Simply point your Eclipse at that folder or zip, eg., <tt>jar:file:/home/rob/code/jbtools/jbosstools/trunk/runtime/site/target/runtime.site.zip!</tt> or <tt>file:///home/rob/code/jbtools/jbosstools/trunk/runtime/site/target/repository/</tt>, and browse the site. If your component requires other upstream components to install, eg., Runtime Detection depends on JBoss Common, you will also need to provide a URL from which Eclipse can resolve these missing dependencies. In order of freshness, you can use:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><ol><li><span class="error"></span><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/updates/nightly/core/trunk/">http://download.jboss.org/jbosstools/updates/nightly/core/trunk/</a> (Nightly Trunk Site - updated every few hours or at least daily - <span style="color: #800000;"><strong>bleeding edge</strong></span>)</li><li><span class="error"></span><a class="jive-link-external-small" href="http://download.jboss.org/jbosstools/builds/staging/_composite_/core/trunk/">http://download.jboss.org/jbosstools/builds/staging/_composite_/core/trunk/</a> (Composite Staging Site - updated every time a component respins - <span style="color: #993300;"><strong>bleedinger edge</strong></span>)</li><li><span class="error"></span><a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/build/aggregate/local-site/">http://anonsvn.jboss.org/repos/jbosstools/trunk/build/aggregate/local-site/</a> (see the README.txt for how to use this site to refer to things you built locally - <span style="color: #ff0000;"><strong>bleedingest edge</strong></span>)</li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h2 id="Adding_a_new_feature_or_plugin_to_an_existing_component">Adding a new feature or plugin to an existing component</h2><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Need to tweak a component to add a new plugin or feature? See <a class="jive-link-wiki-small" href="https://community.jboss.org/docs/DOC-18373">https://community.jboss.org/wiki/AddingAPluginandorFeatureToAnExistingComponent</a>.</p><h2></h2><h2 id="Tips_and_tricks_for_making_BOTH_PDE_UI_and_headless_Maven_builds_happy">Tips and tricks for making BOTH PDE UI and headless Maven builds happy</h2><p>It's fairly common to have plugins compiling in eclipse while tycho would not work. Basically you could say that tycho is far more picky compared to Eclipse PDE. </p><h3 id="Check_your_buildproperties"><br/>Check your build.properties</h3><p>Check build.properties in your plugin. If it has warnings in Eclipse, you'll most likely end with tycho failing to compile your sources. You'll have to make sure that you correct all warnings. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Especially check your build.properties to have entries for <strong>source..</strong> and <strong>output.. </strong>-- these are needed to <strong><a class="jive-link-external-small" href="http://wiki.eclipse.org/Minerva#Source">generate source plugins and features</a></strong>.</p><p><strong><br/></strong></p><pre class="jive-pre"><code class="jive-code jive-java">source.. = src/&#160;
output.. = bin/&#160;
src.includes = *
src.excludes = src
bin.includes = &lt;your own,\
&#160;&#160;&#160; list of,\
&#160;&#160;&#160; files <font color="navy"><b>for</b></font> inclusion,\
&#160;&#160;&#160; in the jar&gt;
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h3 id="Check_your_manifestmf_dependencies">Check your manifest.mf dependencies</h3><p>A new issue when building against juno shows that all compilation dependencies MUST be EXPLICITLY mentioned in your manifest.mf list of dependencies. A recent example of how this can cause compilation errors is the archives module, which failed to build due to the org.eclipse.ui.views plugin, and its IPropertySheetPage interface, not being found during the build. After investigation, it was discovered that the archives.ui plugin did not explicitly declare a dependency on org.eclipse.ui.views. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Inside eclipse and during indigo builds, however, the depencency was found and there were no compilation errors. This was because a plugin archives.ui explicitly dependend on (org.eclipse.ui.ide) had an explicit dependency on org.eclipse.ui.views.&#160; The IDE was able to see that archives.ui dependended on org.eclipse.ui.ide, and org.eclipse.ui.ide depended on org.eclipse.ui.views.&#160; </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Resolving nested dependencies no longer seems to be guaranteed, and so anything you have a compilation dependency on must now be explicitly declared in your manifest.mf. </p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="https://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="https://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>