blob: 89acf4a97136eb3e65a38a265df10c3f04d2b95c [file] [log] [blame]
<div class="wiki-content maincontent"><h2 id="Building-BuildingActiveMQfromSource">Building ActiveMQ from Source</h2><p>ActiveMQ uses <a shape="rect" class="external-link" href="http://maven.apache.org/">Maven</a> as its build and management tool. If you don't fancy using Maven you can use your IDE directly or <a shape="rect" href="download.html">Download</a> a distribution or JAR.</p><h3 id="Building-Prequisites">Prequisites</h3><p><strong>Required:</strong></p><ul><li>Download and <a shape="rect" class="external-link" href="http://maven.apache.org/download.html">install Maven</a>.</li><li>Get the latest <a shape="rect" href="source.html">Source</a></li><li>JDK (1.6 for version &lt;= 5.10, 1.7 for version &gt; 5.10)</li></ul><h2 id="Building-UsingMaven2(ActiveMQ4.1.xandUp)">Using Maven 2 (ActiveMQ 4.1.x and Up)</h2><p>ActiveMQ 4.1.x and up use Maven 2 to Build. We recommend you download and install <a shape="rect" class="external-link" href="http://maven.apache.org/download.html">Maven 2.0.4</a>.</p><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>You should set the MAVEN_OPTS environment variable to -Xmx800m. There are portions of the ActiveMQ build that are very memory intensive. Increase the maven memory limit so that the build does not fail for you.</p></div></div><h3 id="Building-DoingaQuickBuild">Doing a Quick Build</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn -Dtest=false -DfailIfNoTests=false clean install
</pre>
</div></div><h3 id="Building-UsinganIDE">Using an IDE</h3><p>If you prefer to use an IDE then you can auto-generate the IDE's project files using maven plugins. e.g.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn eclipse:eclipse
</pre>
</div></div><p>or</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">mvn idea:idea
</pre>
</div></div><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Importing into Eclipse</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you have not already done so, you will need to make Eclipse aware of the Maven repository so that it can build everything. In the preferences, go to Java-&gt;Build Path-&gt;Classpath and define a new Classpath Variable named M2_REPO that points to your local Maven repository (i.e., <code>~/.m2/repository</code> on Unix and <code>c:\Documents and Settings\&lt;user&gt;\.m2\repository</code> on Windows).</p></div></div><h3 id="Building-OtherMaven2Goals">Other Maven 2 Goals</h3><p>For more details try the <a shape="rect" href="examples.html">Examples</a> or <a shape="rect" href="benchmark-tests.html">Benchmark Tests</a><br clear="none"> Please refer to the <a shape="rect" class="external-link" href="http://maven.apache.org/plugins/index.html">plugin reference</a> for more details on using them.</p><h2 id="Building-UsingMaven1(ActiveMQ4.0.xandDown)">Using Maven 1 (ActiveMQ 4.0.x and Down)</h2><p>ActiveMQ 4.0.x and down use Maven 1 to Build. We recommend you download and install <a shape="rect" class="external-link" href="http://maven.apache.org/maven-1.x/start/download.html">Maven 1.0.2</a>.</p><h3 id="Building-DoingaQuickBuild.1">Doing a Quick Build</h3><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">maven -Dmaven.test.skip.exec=true
</pre>
</div></div><h3 id="Building-UsinganIDE.1">Using an IDE</h3><p>If you prefer to use an IDE then you can autogenerate the IDE's project files using maven plugins. e.g.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">maven eclipse
</pre>
</div></div><p>or</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">maven idea
</pre>
</div></div><p>etc.</p><h3 id="Building-OtherMaven1Goals">Other Maven 1 Goals</h3><p>For more details try the <a shape="rect" href="examples.html">Examples</a> or <a shape="rect" href="benchmark-tests.html">Benchmark Tests</a><br clear="none"> Please refer to the <a shape="rect" class="external-link" href="http://maven.apache.org/maven-1.x/plugins/bundled/">plugin reference</a> for more details on using them.</p></div>