<?xml version="1.0" encoding="UTF-8"?>
<section version="5.0" xml:id="deployment-plan-mixed" 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>Deployment plan sample example</title>

  <para>This example shows how to control the deployment of two archives which
  are located on the file system</para>

  <para>Myear1.ear and Myear2.ear are located in local directory <filename
  class="directory">/home/elsewhere</filename>.</para>

  <itemizedlist>
    <listitem>
      <para>Add a new repository element in
      $JONAS_BASE/conf/initial-repositories.xml:</para>

      <screen>&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;repositories
  xmlns="http://jonas.ow2.org/ns/deployment-plan/repositories/1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="repositories-1.0.xsd"&gt;

  &lt;!-- Add new repositories here --&gt;
  <emphasis role="bold">&lt;repository id="MyLocalRepository"&gt;
    &lt;type&gt;url&lt;/type&gt;
    &lt;url&gt;file:/home/elsewhere&lt;/url&gt;
  &lt;/repository&gt;</emphasis>
  &lt;!-- Default repositories --&gt;
  &lt;repository id="maven2-central"&gt;
    &lt;type&gt;maven2&lt;/type&gt;
    &lt;url&gt;http://repo1.maven.org/maven2/&lt;/url&gt;
  &lt;/repository&gt;
  &lt;repository id="maven2-ow2-release"&gt;
    &lt;type&gt;maven2&lt;/type&gt;
    &lt;url&gt;http://maven.ow2.org/maven2/&lt;/url&gt;
  &lt;/repository&gt;
  &lt;repository id="maven2-ow2-snapshot"&gt;
    &lt;type&gt;maven2&lt;/type&gt;
    &lt;url&gt;http://maven.ow2.org/maven2-snapshot/&lt;/url&gt;
  &lt;/repository&gt;
 
&lt;/repositories&gt;</screen>
    </listitem>
  </itemizedlist>

  <itemizedlist>
    <listitem>
      <para>create a new deployment plan
      $JONAS_BASE/deploy/MyDeploymentplan.xml</para>

      <screen>  &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:url="http://jonas.ow2.org/ns/deployment-plan/url/1.0"&gt;

    &lt;deployment id="foo1" xsi:type="url:url-deploymentType"&gt;
      &lt;url:resource&gt;Myear1.ear&lt;/url:resource&gt;
    &lt;/deployment&gt;

    &lt;deployment id="foo2" xsi:type="url:url-deploymentType"&gt;    
      &lt;url:resource&gt;Myear2.ear&lt;/url:resource&gt;
    &lt;/deployment&gt;

  &lt;/deployment-plan&gt;   </screen>

      <para>As the deployment plan is under $JONAS_BASE/deploy/ it will be
      taken into account at server starting time.</para>
    </listitem>
  </itemizedlist>
</section>
