camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Running Examples
Date Sat, 23 Jul 2011 09:02: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/Running+Examples">Running
Examples</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" >{code} <br>camel-rider:/tmp/camel/examples$
mvn -v <br></td></tr>
            <tr><td class="diff-changed-lines" >Maven version: <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">2.0.8</span>
<span class="diff-added-words"style="background-color: #dfd;">3.0.3</span> <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Since
Camel 1.4, you can also run the examples with Ant. To do so, download and install Apache Ant.
<br>Several of the examples depend on other projects which you will need to download
to run with Ant. Refer to the individual example README.txt files for details. <br>
<br></td></tr>
            <tr><td class="diff-unchanged" >h3. Running the examples in Maven
<br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">h3.
Running the examples in Ant <br> <br>To run an example, change to the directory
of the example you want to run, set any environment variables mentioned in the README.txt,
and then launch ant: <br> <br>*on UNIX* <br>{code} <br>cd camel-example-spring
<br>export ACTIVEMQ_HOME=&lt;path to ActiveMQ install directory&gt; <br>ant
<br>{code} <br> <br>*on Windows* <br>{code} <br>cd camel-example-spring
<br>set ACTIVEMQ_HOME=&lt;path to ActiveMQ install directory&gt; <br>ant
<br>{code} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >h3. Running the examples in your IDE
<br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="RunningExamples-RunningExamples"></a>Running Examples</h2>

<p>This section walks you through running the examples which are shipped with a <a
href="/confluence/display/CAMEL/Download" title="Download">binary distribution</a>.</p>

<h3><a name="RunningExamples-Beforeyoustart"></a>Before you start</h3>

<p>First you need to <a href="/confluence/display/CAMEL/Download" title="Download">Download</a>
a binary distribution.</p>

<p>To run the demos with maven, you need to <a href="http://maven.apache.org" class="external-link"
rel="nofollow">download and install Apache Maven</a>.</p>

<p>To test your Maven install, change directory to the examples directory and type:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn -v
</pre>
</div></div>
<p>You should see something like:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
camel-rider:/tmp/camel/examples$ mvn -v
Maven version: 3.0.3
</pre>
</div></div>

<h3><a name="RunningExamples-RunningtheexamplesinMaven"></a>Running the
examples in Maven</h3>

<p>To run the <a href="/confluence/display/CAMEL/Walk+through+an+Example" title="Walk
through an Example">first example</a> using Maven, change directory to the example
you want to run then issue the following command:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn exec:java
</pre>
</div></div>
<p>To run the other Spring-based examples such as the <a href="/confluence/display/CAMEL/Spring+Example"
title="Spring Example">Spring Example</a>, use the <a href="/confluence/display/CAMEL/Camel+Maven+Plugin"
title="Camel Maven Plugin">Camel Maven Plugin</a>. For example:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
cd camel-example-spring
mvn camel:run
</pre>
</div></div>

<h3><a name="RunningExamples-RunningtheexamplesinyourIDE"></a>Running the
examples in your IDE</h3>

<p>In each example you can run the main() from your IDE.</p>

<p>To create an IDEA project, run</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn idea:idea
</pre>
</div></div>
<p>If you are an Eclipse user, run</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn eclipse:eclipse
</pre>
</div></div>
<p>You should now be able to open the project(s) in your IDE and run any main() method
you wish.</p>
    </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/Running+Examples">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=57417&revisedVersion=8&originalVersion=7">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Running+Examples?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message