<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:id="maven2-deployment-data" xml:lang="en"
         xmlns="http://docbook.org/ns/docbook"
         xmlns:xlink="http://www.w3.org/1999/xlink"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:svg="http://www.w3.org/2000/svg"
         xmlns:mml="http://www.w3.org/1998/Math/MathML"
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns:db="http://docbook.org/ns/docbook">
  <title>Maven 2 deployments</title>

  <section xml:id="maven2-data">
    <title>Maven2 specific data</title>

    <para>The Maven 2 deployments specific data can only be specified as
    <emphasis>XML elements</emphasis>. Here are those elements : 
    <itemizedlist>
        <listitem>
          <para><emphasis>m2:groupId</emphasis> (required) : the maven group
          id of the artifact.</para>
        </listitem>

        <listitem>
          <para><emphasis>m2:artifactId</emphasis> (required) : the maven
          artifact id of the artifact.</para>
        </listitem>

        <listitem>
          <para><emphasis>m2:version</emphasis> (required) : the version of
          the artifact.</para>
        </listitem>

        <listitem>
          <para><emphasis>m2:type</emphasis> (optional with default value:
          jar) : the maven type of the artifact (jar, war, ear, ...).</para>
        </listitem>

        <listitem>
          <para><emphasis>m2:classifier</emphasis> (optional with empty
          default value) : the maven classifier.</para>
        </listitem>
      </itemizedlist></para>
  </section>

  <section xml:id="maven2-example">
    <title>Full Maven2 deployment plan example</title>

    <para>The following deployment plan contains two Maven2 deployments. The
    first one doesn't specify the resource type, so it is assumed to be
    <varname>jar</varname>. The second one has a <varname>ear</varname>
    type.</para>

    <para><example xml:id="example-deployment-plan-maven2">
        <title>Deployment plan with Maven2 deployments</title>

        <literallayout language="xml">  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;deployment-plan xmlns="http://jonas.ow2.org/ns/deployment-plan/1.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:m2="http://jonas.ow2.org/ns/deployment-plan/maven2/1.0"&gt;

    &lt;deployment xsi:type="m2:maven2-deploymentType" id="dep2"&gt;
      &lt;m2:groupId&gt;org.ow2.easybeans&lt;/m2:groupId&gt;
      &lt;m2:artifactId&gt;easybeans-example-statefulbean&lt;/m2:artifactId&gt;
      &lt;m2:version&gt;1.1.0-SNAPSHOT&lt;/m2:version&gt;
    &lt;/deployment&gt;

    &lt;deployment xsi:type="m2:maven2-deploymentType" id="dep3"&gt;
      &lt;m2:groupId&gt;org.ow2.easybeans&lt;/m2:groupId&gt;
      &lt;m2:artifactId&gt;example-server&lt;/m2:artifactId&gt;
      &lt;m2:version&gt;1.1.0-SNAPSHOT&lt;/m2:version&gt;
      &lt;m2:type&gt;ear&lt;/m2:type&gt;
    &lt;/deployment&gt;

  &lt;/deployment-plan&gt;</literallayout>
      </example></para>
  </section>
</section>
