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 Fri, 18 Jan 2013 16:38:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2042/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 (2)</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>h3. Building with Spring
3.0 <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">
<br>{info:Spring 3.0} <br>Support for Spring 3.0 is deprecated from Camel 2.11
onwards. <br>{info} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >From Camel 2.11.0 onwards, if you
want Camel to be build against Spring 3.0 you have to build with the maven profile {{spring3.0}}.
<br>{code} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >*Note:* the {{camel-test-spring}}
component requires to be built with Spring 3.1. <br> <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">h3.
Building with Spring 3.2 <br>From Camel 2.11.0 onwards, if you want Camel to be build
against Spring 3.2 you have to build with the maven profile {{spring3.2}}. <br>{code}
<br>mvn clean install -Pspring3.2 <br>{code} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. Working with features <br>If
you change anything in the features.xml from {{platform/karaf}} 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 {{platform}} directory. <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="Building-BuildingCamelfromSource"></a>Building Camel
from Source</h2>

<p>Camel uses <a href="http://maven.apache.org/" class="external-link" rel="nofollow">Maven</a>
as its build and management 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).<br/>
  (Maven 3.0.2 or better is required to build Camel 2.10 onwards).
<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/warning.gif" width="16" height="16"
align="absmiddle" alt="" border="0"></td><td><b>A note about using Maven
3.0.4+</b><br />If you intend to build Camel 2.10 onwards using Maven 3.0.4+ then
beforehand please delete any potential .m2 cache you may have for the POM of org.iso_relax.verifier.jaxp.validation:isorelax-jaxp-bridge:jar:1.0.
If interested, the reason for this has been explained <a href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-msv/pom.xml"
class="external-link" rel="nofollow">here</a>.</td></tr></table></div></li>
	<li>Get the latest <a href="/confluence/display/CAMEL/Source" title="Source">Source</a></li>
	<li>Java 1.6<br/>
  (Java 1.5 is @deprecated and no longer supported from Camel 2.7 onwards)<br/>
  (Java 1.7 is supported from Camel 2.10 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=<span class="code-quote">"-Xmx1024m -XX:MaxPermSize=512m"</span>
</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 clean install
</pre>
</div></div>

<h3><a name="Building-Anormalbuildwithoutrunningtests"></a>A normal build
without running tests</h3>

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

<h3><a name="Building-Anormalbuildwithoutrunningtestsbutcheckstyleverificationenabled"></a>A
normal build without running tests but checkstyle verification enabled</h3>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pfastinstall,sourcecheck
</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 -Pfastinstall
</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:configure-workspace -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 -Pfastinstall
</pre>
</div></div>

<h3><a name="Building-BuildingwithSpring3.0"></a>Building with Spring 3.0</h3>

<div class='panelMacro'><table class='infoMacro'><colgroup><col width='24'><col></colgroup><tr><td
valign='top'><img src="/confluence/images/icons/emoticons/information.gif" width="16"
height="16" align="absmiddle" alt="" border="0"></td><td>Support for Spring
3.0 is deprecated from Camel 2.11 onwards.</td></tr></table></div>

<p>From Camel 2.11.0 onwards, if you want Camel to be build against Spring 3.0 you have
to build with the maven profile <tt>spring3.0</tt>.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pspring3.0
</pre>
</div></div>

<h3><a name="Building-BuildingwithSpring3.1"></a>Building with Spring 3.1</h3>
<p>From Camel 2.10.0 onwards, if you want Camel to be build against Spring 3.1 you have
to build with the maven profile <tt>spring3.1</tt>.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pspring3.1
</pre>
</div></div>

<p><b>Note:</b> the <tt>camel-test-spring</tt> component requires
to be built with Spring 3.1.</p>

<h3><a name="Building-BuildingwithSpring3.2"></a>Building with Spring 3.2</h3>
<p>From Camel 2.11.0 onwards, if you want Camel to be build against Spring 3.2 you have
to build with the maven profile <tt>spring3.2</tt>.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn clean install -Pspring3.2
</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=50&originalVersion=49">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