camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Posta (Confluence)" <conflue...@apache.org>
Subject [CONF] Apache Camel > Camel Maven Archetypes
Date Wed, 13 Nov 2013 17:39:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/en/2176/1/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/~ceposta">Christian
Posta</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" >| camel-archetype-web | *Camel 2.7:*
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>
<br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">The
maven coordinates for these archetypes is the following: <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{code:xml}
<br>  &lt;groupId&gt;org.apache.camel.archetypes&lt;/groupId&gt; <br>
 &lt;artifactId&gt;${archetype-name}&lt;/artifactId&gt; <br>  &lt;version&gt;${camel-version}&lt;/version&gt;
<br>{code} <br> <br></td></tr>
            <tr><td class="diff-unchanged" >{info} <br>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.  <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 with Apache ActiveMQ embedded. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-blueprint </td>
<td class='confluenceTd'> <b>Camel 2.8:</b> This archetype is used to create
a new Maven project for Camel routes to be running in OSGi using Blueprint. </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 <a href="/confluence/display/CAMEL/Components" title="Components">Components</a>.
Use this if there is a component missing in Camel that you want to create yourself. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-component-scala </td>
<td class='confluenceTd'> <b>Camel 2.10:</b> This archetype is used for
creating a new Maven project for Camel <a href="/confluence/display/CAMEL/Components" title="Components">Components</a>
using Scala. Use this if there is a component missing in Camel that you want to create yourself.
</td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-cxf-code-first-blueprint </td>
<td class='confluenceTd'> <b>Camel 2.12.2:</b> This archetype is used creating
a new Maven project for Camel with <a href="/confluence/display/CAMEL/CXF" title="CXF">CXF</a>
exposing a web service using code-first style. This project is for OSGi Blueprint containers.
</td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-cxf-contract-first-blueprint </td>
<td class='confluenceTd'> <b>Camel 2.12.1:</b> This archetype is used creating
a new Maven project for Camel with <a href="/confluence/display/CAMEL/CXF" title="CXF">CXF</a>
exposing a web service using contract-first style. This project is for OSGi Blueprint containers.
</td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-dataformat </td>
<td class='confluenceTd'> <b>Camel 2.9:</b> This archetype is used for creating
a new Maven project for Camel <a href="/confluence/display/CAMEL/Data+Format" title="Data
Format">Data Format</a>s. Use this if there is a data format missing in Camel that
you want to create yourself. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-groovy </td>
<td class='confluenceTd'> <b>Camel 2.11:</b> This archetype is used to create
a new Maven project for Camel using Groovy DSL. </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 using Java DSL. </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>. </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 using Spring XML.  </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-spring-dm </td>
<td class='confluenceTd'> <b>Camel 2.8:</b> This archetype is used to create
a new Maven project for Camel routes to be running in OSGi using Spring DM. </td>
</tr>
<tr>
<td class='confluenceTd'> camel-archetype-war </td>
<td class='confluenceTd'> <b>Camel 2.6 or older:</b> 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-webconsole </td>
<td class='confluenceTd'> <b>Camel 2.7:</b> 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-web </td>
<td class='confluenceTd'> <b>Camel 2.7:</b> 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>


<p>The maven coordinates for these archetypes is the following:</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: xml; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
  &lt;groupId&gt;org.apache.camel.archetypes&lt;/groupId&gt;
  &lt;artifactId&gt;${archetype-name}&lt;/artifactId&gt;
  &lt;version&gt;${camel-version}&lt;/version&gt;
</pre>
</div></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.9.0. He'd need to use the following
command</p>

<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
mvn archetype:generate \
  -DarchetypeGroupId=org.apache.camel.archetypes \
  -DarchetypeArtifactId=camel-archetype-war \
  -DarchetypeVersion=2.9.0 \
  -DarchetypeRepository=https://repository.apache.org/content/groups/snapshots-group
</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="theme: Default; brush: java; gutter: false" style="font-size:12px; font-family:
ConfluenceInstalledFont,monospace;">
&lt;pluginRepositories&gt;
  &lt;pluginRepository&gt;
    &lt;releases&gt;
      &lt;enabled&gt;false&lt;/enabled&gt;
    &lt;/releases&gt;
    &lt;snapshots/&gt;
    &lt;id&gt;Apache Snapshot Repository&lt;/id&gt;
    &lt;url&gt;http://repository.apache.org/snapshots&lt;/url&gt;
  &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;" class="grey">
                        <a href="https://cwiki.apache.org/confluence/users/removespacenotification.action?spaceKey=CAMEL">Stop
watching space</a>
            <span style="padding: 0px 5px;">|</span>
                <a href="https://cwiki.apache.org/confluence/users/editmyemailsettings.action">Change
email 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=24&originalVersion=23">View
Changes</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message