camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Camel > Creating a new Camel Component
Date Thu, 08 Apr 2010 03:38:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=CAMEL&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/CAMEL/Creating+a+new+Camel+Component">Creating
a new Camel Component</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~njiang">willem
jiang</a>
    </h4>
     update the doc with latest released archetype plugin
          <div id="versionComment" class="noteMacro" style="display:none; padding: 5px;">
     update the doc with latest released archetype plugin<br />
     </div>
          <br/>
     <div class="notificationGreySide">
         <h2><a name="CreatinganewCamelComponent-CreatinganewCamelComponent"></a>Creating
a new Camel Component</h2>

<p>If you want to create your own version of the <a href="/confluence/pages/createpage.action?spaceKey=CAMEL&amp;title=Camel+Component&amp;linkCreation=true&amp;fromPageId=79286"
class="createlink">Camel Component</a> you can use the maven archetype.</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-component \
  -DarchetypeVersion=2.2.0  \
  -DgroupId=myGroupId                  \
  -DartifactId=myArtifactId   
</pre>
</div></div>

<p>This will create a maven project which contains a demo component, you need to implements
your own component by modifying it.You need to move the META-INF/services/direct file to META-INF/services/PACKAGE_NAME/FOO
where FOO is the URI scheme for your component and any related endpoints created on the fly
and PACKAGE_NAME is your component's package name which is replaced the '.' with '/'.</p>

<p>For more help see <a href="/confluence/display/CAMEL/Writing+Components" title="Writing
Components">Writing Components</a></p>


     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/CAMEL/Creating+a+new+Camel+Component">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=79286&revisedVersion=3&originalVersion=2">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/CAMEL/Creating+a+new+Camel+Component?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message