blob: 5f7c835f05e223f48582ef2321b0aa0b713cd4bc [file] [log] [blame]
<div class="wiki-content maincontent"><h2>Building ActiveMQ from Source</h2><p>ActiveMQ uses <a shape="rect" 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 <link><page ri:content-title="Download"></page></link> a distribution or JAR.</p><h3>Prequisites</h3><p><strong>Required:</strong></p><ul><li>Download and <a shape="rect" href="http://maven.apache.org/download.html">install Maven</a>.</li><li>Get the latest <link><page ri:content-title="Source"></page></link></li><li>JDK (1.6 for version &lt;= 5.10, 1.7 for version &gt; 5.10)</li></ul><h2>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" href="http://maven.apache.org/download.html">Maven 2.0.4</a>.</p><structured-macro ac:macro-id="fe89bdbf-e735-4288-8e2a-70788b5be12e" ac:name="note" ac:schema-version="1"><rich-text-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></rich-text-body></structured-macro><h3>Doing a Quick Build</h3><structured-macro ac:macro-id="97386c09-3915-4735-b982-67ff64289026" ac:name="code" ac:schema-version="1"><plain-text-body>mvn -Dtest=false -DfailIfNoTests=false clean install
</plain-text-body></structured-macro><h3>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><structured-macro ac:macro-id="6a740a84-8959-4edd-b7d3-62fcc971a9e3" ac:name="code" ac:schema-version="1"><plain-text-body>mvn eclipse:eclipse
</plain-text-body></structured-macro><p>or</p><structured-macro ac:macro-id="379bb966-063b-42b0-9cc6-adbaa22ea3a3" ac:name="code" ac:schema-version="1"><plain-text-body>mvn idea:idea
</plain-text-body></structured-macro><structured-macro ac:macro-id="bec970c7-9d56-430f-a4d3-6071f7806eff" ac:name="info" ac:schema-version="1"><parameter ac:name="title">Importing into Eclipse</parameter><rich-text-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></rich-text-body></structured-macro><h3>Other Maven 2 Goals</h3><p>For more details try the <link><page ri:content-title="Examples"></page></link> or <link><page ri:content-title="Benchmark Tests"></page></link><br clear="none"> Please refer to the <a shape="rect" href="http://maven.apache.org/plugins/index.html">plugin reference</a> for more details on using them.</p><h2>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" href="http://maven.apache.org/maven-1.x/start/download.html">Maven 1.0.2</a>.</p><h3>Doing a Quick Build</h3><structured-macro ac:macro-id="4d8fe143-c9c1-416f-b21f-3c0a2129f4b7" ac:name="code" ac:schema-version="1"><plain-text-body>maven -Dmaven.test.skip.exec=true
</plain-text-body></structured-macro><h3>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><structured-macro ac:macro-id="7949995d-1204-4b55-b057-187381772c30" ac:name="code" ac:schema-version="1"><plain-text-body>maven eclipse
</plain-text-body></structured-macro><p>or</p><structured-macro ac:macro-id="33270868-4ce7-4dba-ab5c-2fa84338c4f5" ac:name="code" ac:schema-version="1"><plain-text-body>maven idea
</plain-text-body></structured-macro><p>etc.</p><h3>Other Maven 1 Goals</h3><p>For more details try the <link><page ri:content-title="Examples"></page></link> or <link><page ri:content-title="Benchmark Tests"></page></link><br clear="none"> Please refer to the <a shape="rect" href="http://maven.apache.org/maven-1.x/plugins/bundled/">plugin reference</a> for more details on using them.</p></div>