<!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 Maven3
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/dgolovin">Denis Golovin</a> in <i>JBoss Tools Development</i> - <a href="http://community.jboss.org/docs/DOC-15513">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Current trunk version of JBoss Tools can be built with maven 3 and make it faster and easier for everyone.</p><h2>Prerequisites</h2><ol><li>Java 1.6 SDK</li><li>Maven 3.beta1</li><li>About&#160; 6 GB of free disk space if you want to run all integration tests for&#160; (JBoss AS, Seam and Web Services Tools)</li><li>subversion client 1.6.X&#160; (should work with lower version as well)</li></ol><h2>Environment Setup</h2><h3>Maven&#160; 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 ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn -version
</code></pre>
</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 ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">Apache Maven 3.0-alpha-7 (r921173; 2010-03-09 14:31:07-0800)
Java version: 1.6.0_18
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-22-generic-pae" arch: "i386" Family: "unix"
</code></pre>
</pre><h3>Sources</h3><p>Checkout&#160; sources from anonymous SVN like</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">svn co https://svn.jboss.org/repos/jbosstools/trunk jbosstools-src
</code></pre>
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>This&#160; will take some time dependent on your bandwidth</p><h2>Build Strategies</h2><p>All&#160; commands below is assuming that commands are executed in jbosstools-src&#160; folder after sources checked out as it suggested above.</p><p>There are&#160; several strategies to chose from building everything to build&#160; particular component or part of it like all plug-ins, all tests, all&#160; features, particular plugin/feature.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Target platform&#160; should be built first like</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn -f build/target-platform/pom.xml
</code></pre>
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>If&#160; you want to just compile the modules, tests can be skipped by adding&#160; system property -Dmaven.test.skip=true and you should be able to faster&#160; verify compile issues.</p><h3>Build/Test Everything</h3><p>Current&#160; version cannot be build without local changes because of problem with&#160; with drools component, so to go with this scenario you need to remove&#160; drools references from pom.xml and site/site.xml. After that to&#160; build/test everything use:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn clean install</code></pre>
</pre><h3>Build/Test&#160; Particular Component with Dependencies</h3><p>For convenience there are&#160; aggregator projects defined for each component. It provides a simple&#160; way to build/test components with dependencies.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn clean install -f build/component/${component.name}.xml</code></pre>
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>where&#160; ${component.name} is component you want to build/test. Currently&#160; build/component folder contains aggregator projects for:</p><ol><li> tests </li><li>jmx </li><li>archives </li><li>as </li><li>common </li><li>seam</li></ol><p>more&#160; is coming soon.</p><h3>Build/Test Single Component</h3><p>Be aware that&#160; to get this work all dependencies for this component must be installed&#160; in maven repo. It can be done by build everything first or by build&#160; component and its dependencies using aggregated project as it explained&#160; above. You can skip tests for this build and then enable them back when&#160; you run single component build.</p><p>To build single component use&#160; pom.xml in component's folder like it is shown below.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="java" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn clean install -f ${component.name}/pom.xml</code></pre>
</pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>where&#160; ${component.name} is component's root folder name. For instance to build jmx component use command below</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><pre ___default_attr="plain" jivemacro="code"><pre class="jive-pre"><code class="jive-code">$mvn clean install -f jmx/pom.xml</code></pre>
</pre></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-15513">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>