camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Building
Date Tue, 25 Jan 2011 13:54:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/CAMEL/Building">Building</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~davsclaus">Claus
Ibsen</a>
    </h4>
        <br/>
                         <h4>Changes (3)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>*Required:* <br></td></tr>
            <tr><td class="diff-changed-lines" >* Download and [install Maven|http://maven.apache.org/download.html].
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">(Maven
2.2.1 is required to build Camel 2.5 onwards).</span> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">
 (Maven 3.0.x may have issues building Camel. We are working to support that in a future release.
Keep an eye on the release notes.) <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
 (Maven 2.2.1 or better is required to build Camel 2.5 onwards).  <br></td></tr>
            <tr><td class="diff-unchanged" >* Get the latest [Source]  <br>*
Java 1.6 or better <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="Building-Building"></a>Building </h2>

<p>Camel uses <a href="http://maven.apache.org/" class="external-link" rel="nofollow">Maven</a>
as its build tool. If you don't fancy using Maven you can use your IDE directly or <a href="/confluence/display/CAMEL/Download"
title="Download">Download</a> a distribution or JAR.</p>

<h3><a name="Building-Prequisites"></a>Prequisites</h3>

<p><b>Required:</b></p>
<ul>
	<li>Download and <a href="http://maven.apache.org/download.html" class="external-link"
rel="nofollow">install Maven</a>.<br/>
  (Maven 2.2.1 or better is required to build Camel 2.5 onwards). </li>
	<li>Get the latest <a href="/confluence/display/CAMEL/Source" title="Source">Source</a></li>
	<li>Java 1.6 or better<br/>
  (Java 1.5 is @deprecated and no longer supported from Camel 2.7 onwards)</li>
</ul>


<p><b>Optional:</b></p>
<ul>
	<li><a href="http://www.princexml.com/download/" class="external-link" rel="nofollow">Prince</a>
should be in the executable PATH to generate the PDF documentation</li>
</ul>



<h3><a name="Building-Mavenoptions"></a>Maven options</h3>

<p>To build camel maven has to be configured to use more memory</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m
</pre>
</div></div>

<h3><a name="Building-Anormalbuild"></a>A normal build</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn install
</pre>
</div></div>

<h3><a name="Building-DoingaQuickBuild"></a>Doing a Quick Build</h3>
<p><b>Available as of Camel 2.6</b></p>

<p>The following skips building the manual, the distro and does not execute the unit
tests.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn install -Dfastinstall
</pre>
</div></div>

<h3><a name="Building-UsinganIDE"></a>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" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn eclipse:eclipse
</pre>
</div></div>

<p>or</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn idea:idea
</pre>
</div></div>

<h4><a name="Building-AddingCamelEclipsetemplatestoyourworkspace"></a>Adding
Camel Eclipse templates to your workspace</h4>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn -Psetup.eclipse -Declipse.workspace.dir=/path/to/your/workspace
</pre>
</div></div>

<p>You can also find some helpful notes on usage <a href="http://janstey.blogspot.com/2008/08/eclipse-templates-for-apache-camel.html"
class="external-link" rel="nofollow">here</a>. </p>

<h4><a name="Building-ImportingintoEclipse"></a>Importing into Eclipse</h4>
<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., <tt>~/.m2/repository</tt> on Unix and <tt>c:\Documents and Settings\&lt;user&gt;\.m2\repository</tt>
on Windows).</p>

<p>You can also get Maven to do this for you:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn eclipse:add-maven-repo -Declipse.workspace=/path/to/the/workspace/ 
</pre>
</div></div>

<h3><a name="Building-Buildingwithcheckstyle"></a>Building with checkstyle</h3>

<p>To enable source style checking with checkstyle, build Camel with the -Psourcecheck
parameter</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn -Psourcecheck clean install
</pre>
</div></div>

<h3><a name="Building-Buildingsourcejars"></a>Building source jars</h3>
<p>If you want to build jar files with the source code, that for instance Eclipse can
important so you can debug the Camel code as well. Then you can run this command from the
camel root folder:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean source:jar install -Dtest=<span class="code-keyword">false</span>
</pre>
</div></div>

<h3><a name="Building-BuildingwithSpring2.5.6"></a>Building with Spring
2.5.6</h3>
<p>From Camel 2.4.0, we switch the default Spring version to 3.0.x, If you want Camel
to be build against Spring 2.5.6 you have to build with the maven profile <tt>spring-2.x</tt>.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pspring-2.x
</pre>
</div></div>

<p>You may want to skip testing and do a fast build</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pspring-2.x -Dtest=<span class="code-keyword">false</span>
</pre>
</div></div>

<h3><a name="Building-Workingwithfeatures"></a>Working with features</h3>
<p>If you change anything in the features.xml from <tt>platform/karaf</tt>
you can run a validation step to ensure the generated features.xml file is correct. You can
do this running the following maven goal from the <tt>platform</tt> directory.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pvalidate
</pre>
</div></div>

<h3><a name="Building-SeeAlso"></a>See Also</h3>

<ul>
	<li><a href="/confluence/display/CAMEL/Running+Unit+Tests" title="Running Unit Tests">Running
Unit Tests</a></li>
	<li><a href="/confluence/display/CAMEL/Source" title="Source">Source</a></li>
	<li><a href="/confluence/display/CAMEL/Examples" title="Examples">Examples</a></li>
</ul>


    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Building">View Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=49126&revisedVersion=35&originalVersion=34">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Building?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message