<?xml version="1.0"?>
<document>
  <header>
    <product>resin</product>
    <title>Cluster Application Deployment</title>
    <type>contents</type>
    <description>
      <p/>
    </description>
  </header>
  <body>
    <s1 title="Maven Deploy Client">
      <example title="Configuring the Maven Plugin in a pom.xml file">
&lt;?xml version="1.0"?>
&lt;project xmlns="http://maven.apache.org/POM/4.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
  &lt;modelVersion>4.0.0&lt;/modelVersion>
  &lt;groupId>com.test&lt;/groupId>
  &lt;artifactId>test&lt;/artifactId>
  &lt;packaging>war&lt;/packaging>
  &lt;version>1.0-SNAPSHOT&lt;/version>
  &lt;name>test Maven Webapp&lt;/name>
  &lt;url>http://maven.apache.org&lt;/url>

  &lt;dependencies>
  ...
  &lt;/dependencies>

  &lt;pluginRepositories>
    &lt;pluginRepository>
      &lt;snapshots>
        &lt;enabled>true&lt;/enabled>
        &lt;updatePolicy>always&lt;/updatePolicy>
        &lt;checksumPolicy>ignore&lt;/checksumPolicy>
      &lt;/snapshots>
      &lt;id>caucho&lt;/id>
      &lt;name>Caucho&lt;/name>
      &lt;url>http://caucho.com/m2-snapshot&lt;/url>
    &lt;/pluginRepository>
  &lt;/pluginRepositories>

  &lt;build>
    &lt;finalName>foo&lt;/finalName>

    &lt;plugins>
      &lt;plugin>
        &lt;groupId>com.caucho&lt;/groupId>
        &lt;artifactId>resin-maven-plugin&lt;/artifactId>
        &lt;version>4.0-SNAPSHOT&lt;/version>
        &lt;configuration>
          &lt;server>127.0.0.1&lt;/server>
          &lt;port>8086&lt;/port>
          &lt;user>foo&lt;/user>
          &lt;password>test&lt;/password>
        &lt;/configuration>
      &lt;/plugin>
    &lt;/plugins>
  &lt;/build>
&lt;/project>
      </example>

      <deftable title="Maven Mojo Reference">
        <tr>
          <th>Mojo</th>
          <th>Parameter name</th>
          <th>System property</th>
          <th>Required?</th>
          <th>Default</th>
          <th>Description</th>
        </tr>
        <tr>
          <th rowspan="5">Common properties for all Mojos</th>
          <td>server</td>
          <td>resin.server</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The IP or address of the Resin server</td>
        </tr>
        <tr>
          <td>port</td>
          <td>resin.port</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The port of the Resin server's HTTP port</td>
        </tr>
        <tr>
          <td>user</td>
          <td>resin.user</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The user to use when logging into the Resin server</td>
        </tr>
        <tr>
          <td>password</td>
          <td>resin.password</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The password to use when logging into the Resin server</td>
        </tr>
        <tr>
          <td>commitMessage</td>
          <td>resin.commitMessage</td>
          <td>No</td>
          <td>N/A</td>
          <td>The commit message to log for any changes to the application repository</td>
        </tr>
        <tr>
          <th rowspan="7">resin:upload-war</th>
          <td>warFile</td>
          <td>resin.warFile</td>
          <td>Yes</td>
          <td>${project.build.directory}/ ${project.build.finalName}.war (the war file produced for the project)</td>
          <td>The war file to upload to the Resin server</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>resin.stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage to use for the deployed application</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>resin.virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host to use for the deployed application</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>resin.contextRoot</td>
          <td>Yes</td>
          <td>/${project.build.finalName}<br/>(the "final name" of the project)</td>
          <td>The context root of the deployed application</td>
        </tr>
        <tr>
          <td>version</td>
          <td>resin.version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version to use for the deployed application</td>
        </tr>
        <tr>
          <td>archive</td>
          <td>resin.archive</td>
          <td>No</td>
          <td>false</td>
          <td>When set to true, an archive tag is set in addition to the main tag.  Can also be an explicit tag.</td>
        </tr>
        <tr>
          <td>writeHead</td>
          <td>resin.writeHead</td>
          <td>No</td>
          <td>true</td>
          <td>When set to true and using versioning, a "head" tag is also set.</td>
        </tr>
        <tr>
          <th rowspan="10">resin:copy-tag</th>
          <td>stage</td>
          <td>resin.stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the target tag</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>resin.virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the target tag</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>resin.contextRoot</td>
          <td>Yes (if tag not given)</td>
          <td>/${project.build.finalName}<br/>(the "final name" of the project)</td>
          <td>The context root of the target tag</td>
        </tr>
        <tr>
          <td>version</td>
          <td>resin.version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the target tag</td>
        </tr>
        <tr>
          <td>sourceStage</td>
          <td>resin.sourceStage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the source tag</td>
        </tr>
        <tr>
          <td>sourceVirtualHost</td>
          <td>resin.sourceVirtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the source tag</td>
        </tr>
        <tr>
          <td>sourceContextRoot</td>
          <td>resin.sourceContextRoot</td>
          <td>Yes (if sourceTag not given)</td>
          <td>N/A</td>
          <td>The context root of the source tag</td>
        </tr>
        <tr>
          <td>sourceVersion</td>
          <td>resin.sourceVersion</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the source tag</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>resin.tag</td>
          <td>Yes (if contextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit target tag</td>
        </tr>
        <tr>
          <td>sourceTag</td>
          <td>resin.sourceTag</td>
          <td>Yes (if sourceContextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit source tag</td>
        </tr>
        <tr>
          <th rowspan="5">resin:delete-tag</th>
          <td>stage</td>
          <td>resin.stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the tag to be deleted</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>resin.virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the tag to be deleted</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>resin.contextRoot</td>
          <td>Yes (if tag not given)</td>
          <td>/${project.build.finalName}<br/>(the "final name" of the project)</td>
          <td>The context root of the tag to be deleted</td>
        </tr>
        <tr>
          <td>version</td>
          <td>resin.version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the tag to be deleted</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>resin.tag</td>
          <td>Yes (if contextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit tag to be deleted</td>
        </tr>
        <tr>
          <th rowspan="5">resin:query-tags
</th>
          <td>stage</td>
          <td>resin.stage</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>"default"</td>
          <td>The query pattern for the stage portion of tags in the repository
</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>resin.virtualHost</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>"default"</td>
          <td>The query pattern for the virtual host portion of tags in the repository</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>resin.contextRoot</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>/${project.build.finalName}<br/>(the "final name" of the project)</td>
          <td>The query pattern for the context root portion of tags in the repository</td>
        </tr>
        <tr>
          <td>version</td>
          <td>resin.version</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>N/A</td>
          <td>The query pattern for the version portion of tags in the repository</td>
        </tr>
        <tr>
          <td>pattern</td>
          <td>resin.pattern</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>N/A</td>
          <td>An explicit query pattern for entire tags in the repository</td>
        </tr>
      </deftable>
    </s1>

    <s1 title="Ant Deploy Client">
      <example title="Using the Ant tasks">
&lt;project xmlns:resin="antlib:com.caucho.ant">
  &lt;-- if resin-ant.jar is not installed locally -->
  &lt;taskdef uri="antlib:com.caucho.ant"
           resource="com/caucho/ant/antlib.xml"
           classpath="path/to/resin-ant.jar"/>

  &lt;resin:upload-war server="192.168.0.10"
                    port="8080"
                    user="admin"
                    password="myadminpass"
                    warFile="clustered-app.war"
                    version="1.0"/>
&lt;/project>
      </example>
      <deftable title="Ant Task Reference">
        <tr>
          <th>Task name</th>
          <th>Parameter name</th>
          <th>Required?</th>
          <th>Default</th>
          <th>Description</th>
        </tr>
        <tr>
          <th rowspan="5">Common properties for all tasks</th>
          <td>server</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The IP or address of the Resin server</td>
        </tr>
        <tr>
          <td>port</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The port of the Resin server's HTTP port</td>
        </tr>
        <tr>
          <td>user</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The user to use when logging into the Resin server</td>
        </tr>
        <tr>
          <td>password</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The password to use when logging into the Resin server</td>
        </tr>
        <tr>
          <td>commitMessage</td>
          <td>No</td>
          <td>N/A</td>
          <td>The commit message to log for any changes to the application repository</td>
        </tr>
        <tr>
          <th rowspan="7">resin-upload-war (com.caucho.ant.ResinUploadWar)</th>
          <td>warFile</td>
          <td>Yes</td>
          <td>N/A</td>
          <td>The war file to upload to the Resin server</td>
        </tr>
        <tr>
          <td>stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage to use for the deployed application</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host to use for the deployed application</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>No</td>
          <td>/[war file prefix]</td>
          <td>The context root of the deployed application</td>
        </tr>
        <tr>
          <td>version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version to use for the deployed application</td>
        </tr>
        <tr>
          <td>archive</td>
          <td>No</td>
          <td>false</td>
          <td>When set to true, an archive tag is set in addition to the main tag.  Can also be an explicit tag.</td>
        </tr>
        <tr>
          <td>writeHead</td>
          <td>No</td>
          <td>true</td>
          <td>When set to true and using versioning, a "head" tag is also set.</td>
        </tr>
        <tr>
          <th rowspan="10">resin-copy-tag (com.caucho.ant.ResinCopyTag)</th>
          <td>stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the target tag</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the target tag</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>Yes (if tag not given)</td>
          <td>N/A</td>
          <td>The context root of the target tag</td>
        </tr>
        <tr>
          <td>version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the target tag</td>
        </tr>
        <tr>
          <td>sourceStage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the source tag</td>
        </tr>
        <tr>
          <td>sourceVirtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the source tag</td>
        </tr>
        <tr>
          <td>sourceContextRoot</td>
          <td>Yes (if sourceTag not given)</td>
          <td>N/A</td>
          <td>The context root of the source tag</td>
        </tr>
        <tr>
          <td>sourceVersion</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the source tag</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>Yes (if contextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit target tag</td>
        </tr>
        <tr>
          <td>sourceTag</td>
          <td>Yes (if sourceContextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit source tag</td>
        </tr>
        <tr>
          <th rowspan="5">resin-delete-tag (com.caucho.ant.ResinDeleteTag)
    </th>
          <td>stage</td>
          <td>No</td>
          <td>"default"</td>
          <td>The stage of the tag to be deleted</td>
        </tr>
        <tr>
          <td>resin.virtualHost</td>
          <td>No</td>
          <td>"default"</td>
          <td>The virtual host of the tag to be deleted</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>Yes (if tag not given)</td>
          <td>N/A</td>
          <td>The context root of the tag to be deleted</td>
        </tr>
        <tr>
          <td>version</td>
          <td>No</td>
          <td>N/A</td>
          <td>The version of the tag to be deleted</td>
        </tr>
        <tr>
          <td>tag</td>
          <td>Yes (if contextRoot not given)</td>
          <td>N/A</td>
          <td>An explicit tag to be deleted</td>
        </tr>
        <tr>
          <th rowspan="5">resin-query-tags (com.caucho.ant.ResinQueryTags)</th>
          <td>stage</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>"default"</td>
          <td>The query pattern for the stage portion of tags in the repository</td>
        </tr>
        <tr>
          <td>virtualHost</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>"default"</td>
          <td>The query pattern for the virtual host portion of tags in the repository</td>
        </tr>
        <tr>
          <td>contextRoot</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>".*"</td>
          <td>The query pattern for the context root portion of tags in the repository</td>
        </tr>
        <tr>
          <td>version</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>N/A</td>
          <td>The query pattern for the version portion of tags in the repository</td>
        </tr>
        <tr>
          <td>pattern</td>
          <td>Yes (At least one pattern (either stage, virtualHost, contextRoot, version, or pattern) must be given</td>
          <td>N/A</td>
          <td>An explicit query pattern for entire tags in the repository</td>
        </tr>
      </deftable>
    </s1>
  </body>
</document>
