<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "../../User_Guide.ent">
%BOOK_ENTITIES;
]>
<chapter id="javabuilding">
  <title>Building mod_cluster's Java components from source</title>

  <para>Building from source the components used in JBoss AS/JBossWeb/Tomcat
  requires Maven 2.0.x.</para>

  <para>Steps to build:</para>

  <orderedlist>
    <listitem>
      <para>Download the mod_cluster sources</para>

      <para><programlisting>svn co http://anonsvn.jboss.org/repos/mod_cluster/trunk/ mod_cluster</programlisting></para>
    </listitem>

    <listitem>
      <para>Use maven "dist" profile to build:</para>

      <para><programlisting>cd mod_cluster; mvn -P dist package</programlisting></para>
    </listitem>
  </orderedlist>

  <para>Note: Some maven tests are using UDP port 23365 make sure you are
  local firewall allows the port.</para>

  <sect1>
    <title>Build products</title>

    <para>The build produces the following output in the target
    directory:</para>

    <orderedlist>
      <listitem>
        <para>mod-cluster.sar</para>

        <para>Exploded format sar to copy to the deploy dir in your JBoss AS
        install</para>
      </listitem>

      <listitem>
        <para>JBossWeb-Tomcat/lib directory</para>

        <para>Jar files to copy to the lib directory in your JBossWeb or
        Tomcat install to support use of mod_cluster</para>
      </listitem>

      <listitem>
        <para>demo directory</para>

        <para>The <link
        linkend="demo">load balancing demo</link> application</para>
      </listitem>

      <listitem>
        <para>mod-cluster-XXX.tar.gz</para>

        <para>The full distribution tarball; includes the above
        elements</para>
      </listitem>
    </orderedlist>
  </sect1>
</chapter>
