camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Camel Maven Archetypes
Date Thu, 24 Feb 2011 17:09: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/Camel+Maven+Archetypes">Camel
Maven Archetypes</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~cmoulliard">charles
Moulliard</a>
    </h4>
        <br/>
                         <h4>Changes (1)</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" >| camel-archetype-spring | This archetype
is used to create a new Maven project for Camel routes. You can use this quickly to get up
to speed. It is very similar to the camel-archetype-java archetype with the Java DSL transposed
to Spring XML. | <br>| camel-archetype-war | This archetype is used to create a new
Camel project that deploys the [Camel Web Console, REST API|Web Console], and your routes
as a [WAR|http://en.wikipedia.org/wiki/Sun_WAR_(file_format)] file. | <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">|
camel-archetype-light-war | This archetype is used to create a new Camel project that deploys
Camel Routes using Spring or Java DSL as a [WAR|http://en.wikipedia.org/wiki/Sun_WAR_(file_format)]
file. | <br></td></tr>
            <tr><td class="diff-unchanged" > <br>{info} <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <h2><a name="CamelMavenArchetypes-CamelMavenArchetypes"></a>Camel
Maven Archetypes</h2>

<p>Camel is distributed with the following archetypes for Maven end users.</p>

<h3><a name="CamelMavenArchetypes-ArchetypeSupported"></a>Archetype Supported</h3>

<div class='table-wrap'>
<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> Archetype </th>
<th class='confluenceTh'> Description </th>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-activemq </td>
<td class='confluenceTd'> This archetype is used to create a new Maven project for Camel
routes. You can use this quickly to get up to speed using Camel with ActiveMQ </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-component </td>
<td class='confluenceTd'> This archetype is used for creating a new Maven project for
Camel components. Use this if there is a component missing in Camel that you want to create
yourself. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-java </td>
<td class='confluenceTd'> This archetype is used to create a new Maven project for Camel
routes. You can use this quickly to get up to speed. The archetypes includes sample code that
supporting Spring style routing as well. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-scala </td>
<td class='confluenceTd'> This archetype is used to create a new Maven projects for
building Camel routes in the <a href="/confluence/display/CAMEL/Scala+DSL" title="Scala
DSL">Scala DSL</a>.  The archetype contains a sample RouteBuilder as well as configuration
for using the routes from Spring and OSGi. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-spring </td>
<td class='confluenceTd'> This archetype is used to create a new Maven project for Camel
routes. You can use this quickly to get up to speed. It is very similar to the camel-archetype-java
archetype with the Java DSL transposed to Spring XML. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-war </td>
<td class='confluenceTd'> This archetype is used to create a new Camel project that
deploys the <a href="/confluence/display/CAMEL/Web+Console" title="Web Console">Camel
Web Console, REST API</a>, and your routes as a <a href="http://en.wikipedia.org/wiki/Sun_WAR_(file_format)"
class="external-link" rel="nofollow">WAR</a> file. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-light-war </td>
<td class='confluenceTd'> This archetype is used to create a new Camel project that
deploys Camel Routes using Spring or Java DSL as a <a href="http://en.wikipedia.org/wiki/Sun_WAR_(file_format)"
class="external-link" rel="nofollow">WAR</a> file. </td>
</tr>
</tbody></table>
</div>


<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>When using these archetypes,
make sure your package name is not org.apache.camel (or a sub package of this) as this will
instruct Camel to search in its own packages for your routes. This can also cause Camel not
to start, as shown in CAMEL-1197.</td></tr></table></div>

<h3><a name="CamelMavenArchetypes-Snapshotarchetypes"></a>Snapshot archetypes</h3>

<p>If you would like to use an archetype from an unreleased version of Camel, you just
need to let the maven-archetype-plugin know where to look for it. For example, say someone
wanted to create a WAR based project based on Camel 2.0-SNAPSHOT. He'd need to use the following
command</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
mvn archetype:create \
  -DarchetypeGroupId=org.apache.camel.archetypes \
  -DarchetypeArtifactId=camel-archetype-war \
  -DarchetypeVersion=2.0-SNAPSHOT \
  -DarchetypeRepository=https:<span class="code-comment">//repository.apache.org/content/groups/snapshots-group</span>
</pre>
</div></div>

<p>Notice that archetypes will now be downloaded from <a href="https://repository.apache.org/content/groups/snapshots-group"
class="external-link" rel="nofollow">Apache's snapshot repo</a> instead of <a
href="http://repo1.maven.org/maven2" class="external-link" rel="nofollow">Maven central</a>.</p>

<p>When the project is created, you may need to add another repository to the pom.xml
file. This is to load a SNAPSHOT version of the camel-maven-plugin </p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;pluginRepositories&gt;
  &lt;pluginRepository&gt;
    &lt;releases&gt;
      &lt;enabled&gt;<span class="code-keyword">false</span>&lt;/enabled&gt;
    &lt;/releases&gt;
    &lt;snapshots/&gt;
    &lt;id&gt;Apache Snapshot Repository&lt;/id&gt;
    &lt;url&gt;http:<span class="code-comment">//repository.apache.org/snapshots&lt;/url&gt;
</span>  &lt;/pluginRepository&gt;
&lt;/pluginRepositories&gt;
</pre>
</div></div>

<h3><a name="CamelMavenArchetypes-Examples"></a>Examples</h3>
<p>See <a href="/confluence/display/CAMEL/Creating+a+new+Spring+based+Camel+Route"
title="Creating a new Spring based Camel Route">Creating a new Spring based Camel Route</a>
for a sample how to use the camel-archetype-java and camel-archetype-spring archetypes.</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/Camel+Maven+Archetypes">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=87085&revisedVersion=11&originalVersion=10">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/CAMEL/Camel+Maven+Archetypes?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message