servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache ServiceMix > Maven archetypes
Date Wed, 14 Oct 2009 13:09:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=SM&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/SM/Maven+archetypes">Maven
archetypes</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~nanthrax">Jean-Baptiste
Onofré</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <p>ServiceMix provides a set of <a href="http://maven.apache.org/plugins/maven-archetype-plugin/"
rel="nofollow">Maven archetypes</a> for many different purposes, such as for creation
of JBI components, service assemblies or service units for particular ServiceMix components.
</p>

<h2><a name="Mavenarchetypes-Usage"></a>Usage</h2>
<h3><a name="Mavenarchetypes-StandardMavensyntax"></a>Standard Maven syntax</h3>
<p>You can utilize an archetype by issueing 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.servicemix.tooling \
    -DarchetypeArtifactId=servicemix-archetype-name \
    -DgroupId=org.apache.servicemix.samples.embedded \
    -DartifactId=servicemix-embedded-example
</pre>
</div></div>
<p>You need to replace <tt>servicemix-archetype-name</tt> by the name of
the archetype you want to utilize.  This will use the latest released version of the archetype
available in the repository.  Optionally, you can also specify a specific version to use with
the -DarchetypeVersion=VERSION parameter.</p>

<p>If you are using an <tt>*-incubating</tt> version of ServiceMix (e.g.
3.1.1-incubating), you have to either:</p>
<ul>
	<li>add an additional parameter (<tt>-DremoteRepositories=<a href="http://repository.apache.org/content/groups/public"
rel="nofollow">http://repository.apache.org/content/groups/public</a></tt>)
to the command above</li>
	<li>or you can configure the additional repository as described in <a href="/confluence/display/SM/Configuring+Maven+%283.x-incubating+versions+only%29"
title="Configuring Maven (3.x-incubating versions only)">Configuring Maven &#40;3.x&#45;incubating
versions only&#41;</a></li>
</ul>


<h3><a name="Mavenarchetypes-smxarch"></a>smx-arch</h3>
<p>ServiceMix also ships with <tt>smx-arch</tt> (or <tt>smx-arch.bat</tt>
for Windows), available in the <tt>bin</tt> directory of the distribution.  It
provides a more convenient way for using the archetypes:</p>
<div class="preformatted panel" style="border-width: 1px;"><div class="preformattedContent
panelContent">
<pre>Usage: smx-arch command [su-type] [args]
  commands:
    sl                Creates a new Shared Library"  
    se                Creates a new Service Engine"
    bc                Creates a new Binding Component"
    sa                Creates a new Service Assembly"
    su                Creates a generic Service Unit"
    su [type]         Creates a SU of the specified type"
  SU types:
                      http-consumer, http-provider,"
                      jms-consumer, jms-provider,"
                      ftp-poller, ftp-sender,"
                      jsr181-annotated, jsr181-wsdl-first,"
                      saxon-xquery, saxon-xslt,"
                      eip, lwcontainer, bean, ode"
  Optional arguments:
    -DarchetypeVersion=x.y.z-classifier (if not specified, the latest released version will
be used
    -DgroupId=xxxx"
    -DartifactId=xxxx"
</pre>
</div></div>

<h2><a name="Mavenarchetypes-Listofarchetypes"></a>List of archetypes</h2>
<p>Here is a list of the ServiceMix archetypes that are available.  You can also take
a look at the current list of available archetypes at <a href="https://repository.apache.org/content/groups/public/"
rel="nofollow">https://repository.apache.org/content/groups/public/</a> or in the
<tt>archetypes</tt> directory in a ServiceMix source distribution. </p>

<h3><a name="Mavenarchetypes-BasicJBIartifactarchetypes"></a>Basic JBI artifact
archetypes</h3>
<p>There is a specific archetype available for generating every type of JBI artifact.
 They are named <tt>servicemix-binding-component</tt>, <tt>servicemix-service-assembly</tt>,
<tt>servicemix-service-engine</tt>, <tt>servicemix-service-unit</tt>
and <tt>servicemix-shared-library</tt>.</p>




<h3><a name="Mavenarchetypes-Serviceunits"></a>Service units</h3>
<p>Most of the ServiceMix archetypes can be used to create service unit projects.  The
list above already mentions <tt>servicemix-service-unit</tt>, which creates a
generic SU project.  You still have to add a &lt;dependency/&gt; to the pom.xml yourself
for the JBI component you want to target.  </p>

<p>These other archetypes already generate a SU targeted at a specific component.  They
also provide an xbean.xml file and sometimes some additional sample files.</p>

<table class='confluenceTable'><tbody>
<tr>
<th class='confluenceTh'> archetype </th>
<th class='confluenceTh'> JBI component </th>
<th class='confluenceTh'> contents of xbean.xml  </th>
<th class='confluenceTh'> remarks </th>
</tr>
<tr>
<td class='confluenceTd'> servicemix-bean-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-bean" title="servicemix-bean">servicemix&#45;bean</a>
</td>
<td class='confluenceTd'> a bean endpoint definition </td>
<td class='confluenceTd'> also generates a sample class named MyBean </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-camel-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-camel" title="servicemix-camel">servicemix&#45;camel</a>
</td>
<td class='confluenceTd'>&nbsp;</td>
<td class='confluenceTd'> deploys a set of Camel EIP routes <br clear="all" />
(version 3.2 or above only) </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-drools-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-drools" title="servicemix-drools">servicemix&#45;drools</a>
</td>
<td class='confluenceTd'> a drools endpoint </td>
<td class='confluenceTd'> also generates a sample Drools rule file named router.drl
<br clear="all" /> (version 3.2 or above only) </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-eip-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-eip" title="servicemix-eip">servicemix&#45;eip</a>
</td>
<td class='confluenceTd'> an example for every EIP supported </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-file-poller-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-file" title="servicemix-file">servicemix&#45;file</a>
</td>
<td class='confluenceTd'> an &lt;<a href="file:poller/" rel="nofollow">file:poller/</a>&gt;
endpoint </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-file-sender-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-file" title="servicemix-file">servicemix&#45;file</a>
</td>
<td class='confluenceTd'> an &lt;<a href="file:sender/" rel="nofollow">file:sender/</a>&gt;
endpoint </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-ftp-poller-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-ftp" title="servicemix-ftp">servicemix&#45;ftp</a>
</td>
<td class='confluenceTd'> an &lt;ftp:poller/&gt; endpoint </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-ftp-sender-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-ftp" title="servicemix-ftp">servicemix&#45;ftp</a>
</td>
<td class='confluenceTd'> an &lt;ftp:sender/&gt; endpoint </td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-http-consumer-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-http" title="servicemix-http">servicemix&#45;http</a>
</td>
<td class='confluenceTd'> some examples of possible HTTP consumer endpoint configurations
</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-http-provider-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-http" title="servicemix-http">servicemix&#45;http</a>
</td>
<td class='confluenceTd'> some examples of possible HTTP provider endpoint configurations
</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-jms-consumer-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-jms" title="servicemix-jms">servicemix&#45;jms</a>
</td>
<td class='confluenceTd'> some examples of possible JMS consumer endpoint configurations
</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-jms-provider-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-jms" title="servicemix-jms">servicemix&#45;jms</a>
</td>
<td class='confluenceTd'> some examples of possible JMS provider endpoint configurations
</td>
<td class='confluenceTd'>&nbsp;</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-jsr181-annotated-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-jsr181" title="servicemix-jsr181">servicemix&#45;jsr181</a>
</td>
<td class='confluenceTd'> a JSR-181 annotated POJO endpoint </td>
<td class='confluenceTd'> also generates a sample class named ExampleService </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-jsr181-wsdl-first-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-jsr181" title="servicemix-jsr181">servicemix&#45;jsr181</a>
</td>
<td class='confluenceTd'> a JSR-181 WSDL based endpoint </td>
<td class='confluenceTd'> also generates a sample WSDL file </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-lwcontainer-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-lwcontainer"
title="servicemix-lwcontainer">servicemix&#45;lwcontainer</a> </td>
<td class='confluenceTd'> / </td>
<td class='confluenceTd'> the servicemix.xml provided defines a sample lightweight component
</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-ode-service-unit </td>
<td class='confluenceTd'> <a href="http://ode.apache.org/" rel="nofollow">Apache
ODE </a> BPEL engine </td>
<td class='confluenceTd'> / </td>
<td class='confluenceTd'> creates a sample BPEL, WSDL and deploy.xml</td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-osworkflow-service-unit </td>
<td class='confluenceTd'> <a href="http://www.opensymphony.com/osworkflow/" rel="nofollow">OpenSymphony
</a> workflow engine </td>
<td class='confluenceTd'> / </td>
<td class='confluenceTd'> creates a sample workflow </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-saxon-xquery-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-saxon" title="servicemix-saxon">servicemix&#45;saxon</a>
</td>
<td class='confluenceTd'> examples of all supported (resource, inline and dynamic) ways
to XQuery </td>
<td class='confluenceTd'> also generates an example of an XQuery file </td>
</tr>
<tr>
<td class='confluenceTd'> servicemix-saxon-xslt-service-unit </td>
<td class='confluenceTd'> <a href="/confluence/display/SM/servicemix-saxon" title="servicemix-saxon">servicemix&#45;saxon</a>
</td>
<td class='confluenceTd'> examples of static and dynamic XSL-T usage </td>
<td class='confluenceTd'> provides an example of an XSL-T file </td>
</tr>
</tbody></table>
     </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/SM/Maven+archetypes">View
Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=63464&revisedVersion=18&originalVersion=17">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/SM/Maven+archetypes?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message