Commit f39c71c9 authored by Gwenael Cattez's avatar Gwenael Cattez

Update FraSCAti Contribution Plugin documentation

parent 210d7cfd
......@@ -3,16 +3,16 @@
<!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>
<title>FraSCAti Contribution Plugin</title>
<section>
<title>About SCA Contributions</title>
<para>The SCA Assembly specification defines an interoperable packaging
format for deploying "contributions" which defines several "deployable"
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.</para>
format for deploying "contribution" which contains several "deployable"
SCA composites. A contribution package is usually a ZIP archive containing
several SCA composites and a contribution definition describing composites
to be deployed by the SCA runtime.</para>
</section>
<section>
......@@ -21,11 +21,11 @@
<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 add the project jar and dependencies defined in the include
plugin configuration to the contribution. An usage example is given
<para>The contribution Maven plugin 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
adds the project jar and dependencies defined in the include plugin
configuration to the contribution. An usage example is given
below.</para>
<programlisting>....
......@@ -35,7 +35,7 @@
&lt;plugin&gt;
&lt;groupId&gt;org.ow2.frascati.mojo&lt;/groupId&gt;
&lt;artifactId&gt;frascati-contribution-plugin&lt;/artifactId&gt;
&lt;version&gt;1.5-SNAPSHOT&lt;/version&gt;
&lt;version&gt;1.5&lt;/version&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;id&gt;frascati-contribution&lt;/id&gt;
......@@ -50,13 +50,13 @@
&lt;classifier&gt;myClassifier&lt;/classifier&gt;
&lt;include&gt;
&lt;dependency&gt;
&lt;groupId&gt;exemple.group.id1&lt;/groupId&gt;
&lt;artifactId&gt;exemple.artifact.id1&lt;/artifactId&gt;
&lt;groupId&gt;example.group.id1&lt;/groupId&gt;
&lt;artifactId&gt;example.artifact.id1&lt;/artifactId&gt;
&lt;version&gt;version&lt;/version&gt;
&lt;/dependency&gt;
&lt;dependency&gt;
&lt;groupId&gt;exemple.group.id2&lt;/groupId&gt;
&lt;artifactId&gt;exemple.artifact.id2&lt;/artifactId&gt;
&lt;groupId&gt;example.group.id2&lt;/groupId&gt;
&lt;artifactId&gt;example.artifact.id2&lt;/artifactId&gt;
&lt;version&gt;version&lt;/version&gt;
&lt;/dependency&gt;
&lt;/include&gt;
......@@ -96,7 +96,7 @@
&lt;/plugins&gt;
&lt;/build&gt;</programlisting>
<para>When running maven installation for your project, the contribution
<para>When running Maven installation for your project, the contribution
plugin will generate a file named "sca-contribution.xml" using the given
plugin configuration. The resulting XML file will look like to the code
snippet below.</para>
......@@ -113,20 +113,20 @@
<para>The SCA contribution file will be added to the "META-INF"
directory, while the project jar and included dependencies are added in
directory the "lib/group_id_of_depedency/" directory of the contribution
package.</para>
directory the "lib/group_id_of_dependency/" 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
automatically load libraries and start a domain with the composites
described in the contribution definition.</para>
</section>
<section>
<title>Parameters</title>
<para>The contribution plugin can be configured with the follwing
parameter</para>
<para>The contribution plugin can be configured with the following
parameters : </para>
<itemizedlist>
<listitem>
......@@ -141,33 +141,34 @@
</listitem>
<listitem>
<para>Include : A list of maven dependencies to include as lib in
the contribution file. Due to trouble with the maven
ArtifactResolver the version of the dependency can't be a maven
property such as ${xxxxx.version}.</para>
<para>Include : A list of Maven dependencies to include as lib in
the contribution file.Note that trasitive dependencies are added to
the contribution. Due to trouble with the maven ArtifactResolver the
version of a dependency can't be a Maven property such as
${xxxxx.version}.</para>
</listitem>
<listitem>
<para>Deployables : A list of deployables composites to be added to
<para>Deployables : A list of deployable composites to be added to
the contribution definition.</para>
</listitem>
<listitem>
<para>ExcludeGroups : A list of groupId, all dependencies with the
groupId will be exclude from the contribution. By default
groupId will be excluded from the contribution. By default
"org.ow2.frascati" and "org.objectweb.fractal.bf" groupId are
excluded, to avoid this behaviour add
&lt;exclude&gt;none&lt;/exclude&gt; to the excludeGroups</para>
&lt;exclude&gt;none&lt;/exclude&gt; to the excludeGroups.</para>
</listitem>
<listitem>
<para>Imports : A list of all SCA import needed by the
contribution</para>
contribution.</para>
</listitem>
<listitem>
<para>Export : A list of all SCA exports done by the
contribution</para>
contribution.</para>
</listitem>
</itemizedlist>
</section>
......@@ -175,9 +176,9 @@
<section>
<title>Utility Class</title>
<para>A utility class: org.ow2.frascati.mojo.ContributionUtil allowing
to create contribution files via a simple call. An usage example is
given below.</para>
<para>A utility class: org.ow2.frascati.mojo.ContributionUtil allows to
create contribution files via a simple call. An usage example is given
below.</para>
<programlisting>import org.ow2.frascati.mojo.ContributionUtil;
import org.ow2.frascati.mojo.Import;
......@@ -185,7 +186,6 @@ import org.ow2.frascati.mojo.Export;
Collection&lt;File&gt; jars = new ArrayList&lt;File&gt;();
Collection&lt;String&gt; deployables = new ArrayList&lt;String&gt;();
Collection&lt;String&gt; deployables = new ArrayList&lt;String&gt;();
Collection&lt;Import&gt; imports = new ArrayList&lt;Import&gt;();
Collection&lt;Export&gt; exports = new ArrayList&lt;Export&gt;();
......@@ -194,10 +194,10 @@ jars.add(new File("dependency2.jar"));
jars.add(new File("myComposite.jar"));
deployables.add("composite1.composite");
deployables.add("composite2.composite");
imports.add(new Import("java","package.to.import");
imports.add(new Import("resource","path/to/resource/to/import");
exports.add(new Export("java","package.to.export");
exports.add(new Export("resource","path/to/resource/to/export");
imports.add(new Import("java","package.to.import"));
imports.add(new Import("resource","path/to/resource/to/import"));
exports.add(new Export("java","package.to.export"));
exports.add(new Export("resource","path/to/resource/to/export"));
String contributionName="myContribution";
File workingDir = new File("./target");
......
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