Commit 93b11a30 authored by Damien Fournier's avatar Damien Fournier

Add documentation for maven contribution plugin

parent 59f7b5d1
<?xml version='1.0' encoding='UTF-8'?>
<!-- This document was created with Syntext Serna Free. --><!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
<section id="contribution-mojo">
<title>FraSCAti Contribution plugin</title>
<section>
<title>About SCA Contributions</title>
<para>The SCA Assembly specification defines an interoperable
packaging
format for deploying &quot;contributions&quot; which defines
several
&quot;deployable&quot; SCA composites. A contribution package
is
usually a ZIP archive which contains
several sca composites and a
contribution definition which describes composites to be deployed by the SCA runtime. FraSCAti actually offers partial support for SCA contibutions (does not support &apos;import&apos; and &apos;export&apos; XML elements in the sca contribution file).</para>
</section>
<section>
<title>Building SCA contributions for FraSCAti</title>
<section>
<title>Overview</title>
<para>The contribution maven plugging allows to easily create contribution ZIP from SCA applications built as maven artifacts. Usually, the contribution plugin is used from a separate Maven project. The plugin extract the jar dependencies defined in the project, and generates an SCA contribution file using deployable described in the plugin configuration. An usage example is given below.</para>
<programlisting>....
&lt;build&gt;
&lt;plugins&gt;
&lt;plugin&gt;
&lt;groupId&gt;org.ow2.frascati.factory&lt;/groupId&gt;
&lt;artifactId&gt;frascati-contribution-plugin&lt;/artifactId&gt;
&lt;version&gt;1.2&lt;/version&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;frascati-contribution&lt;/id&gt;
&lt;phase&gt;package&lt;/phase&gt;
&lt;goals&gt;
&lt;goal&gt;install&lt;/goal&gt;
&lt;/goals&gt;
&lt;/execution&gt;
&lt;/executions&gt;
&lt;configuration&gt;
&lt;deployables&gt;
&lt;deployable&gt;file1.composite&lt;/deployable&gt;
&lt;deployable&gt;file2.composite&lt;/deployable&gt;
.....
&lt;/deployables&gt;
&lt;/configuration&gt;
&lt;/plugin&gt;
&lt;/plugins&gt;
&lt;/build&gt;
....
&lt;dependencies&gt;
....
&lt;dependency&gt;
&lt;groupId&gt;your.frascati.app.id&lt;/groupId&gt;
&lt;artifactId&gt;YourApp&lt;/artifactId&gt;
&lt;version&gt;${version}&lt;/version&gt;
&lt;/dependency&gt;
....
&lt;/dependencies&gt;</programlisting>
<para>When running maven installation for your project, the contribution plugin will generate a file named &quot;sca-contribution.xml&quot; using the given plugin configuration. The resulting XML file will look like to the code snippet below.</para>
<programlisting>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;contribution xmlns=&quot;http://www.osoa.org/xmlns/sca/1.0&quot;&gt;
&lt;deployable composite=&quot;file1.composite&quot;/&gt;
&lt;deployable composite=&quot;file2.composite&quot;/&gt;
&lt;/contribution&gt;</programlisting>
<para>The SCA contribution file will be added the the &quot;META-INF&quot; directory, while the project dependencies will be retrieved and added the &quot;lib&quot; directory of the contribution package.</para>
<para>The ZIP package created in the target directory can be used with FraSCAti runtime. When a contribution ZIP is given, FraSCAti will automatically load libraries and start a domain with the composite described in the contribution definition.</para>
</section>
<section>
<title>Parameters</title>
<para>The contribution plugin can be configured with the follwing parameter</para>
<itemizedlist>
<listitem>
<para>Deployables : A list of deployables composites to be added to the contribution definition.</para>
</listitem>
</itemizedlist>
</section>
</section>
</section>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment