<?xml version="1.0"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
  <properties>
    <title>Getting Started with Jetspeed 2</title>
    <subtitle>Getting up and running quickly</subtitle>
    <authors>
      <person name="David Sean Taylor" email="taylor@apache.org"/>
      <person name="Ate Douma" email="ate@apache.org"/>
    </authors>
  </properties>
  <body>
<section name="Requirements">
<p>
It is expected that the user is familiar with both the <a href="http://maven.apache.org">Apache Maven</a>
 project tool and the <a href="http://ant.apache.org">Apache Ant</a> build tool.
</p>
<ul>
  <li><a href="http://ant.apache.org/bindownload.cgi">Ant 1.5</a> or higher</li>
  <li><a href="http://maven.apache.org/start/download.html">Maven 1.0</a> or higher</li>
  <li>Java 1.4.2_02 or higher</li>
  <li>Servlet 2.3:<br/>
  Tomcat 5.0.30 (or higher)<br/>
  <b>or</b> <br/>
  Tomcat 5.5.8 (or higher)</li>
</ul>
</section>
<section name='1. Get Maven Ready'>
<p>If you have not already done so, download and install Maven.</p>
</section>
<section name='2. Build Properties'>
<p>Please set these values in your ${USER_HOME}/<code>build.properties</code> file:</p>
<table>
  <tr> 
    <th>property</th>
    <th>example</th>
    <th>what is it?</th>
  </tr>
  <tr> 
    <td>org.apache.jetspeed.project.home</td>
    <td>/home/apache/jakarta-jetspeed-2/</td>
    <td>The root of your Jetspeed-2 source installation (see example on left).</td>
  </tr>  
  <tr> 
    <td>org.apache.jetspeed.server.home</td>
    <td>${CATALINA_HOME}/</td>
    <td>The root of your Tomcat server installation.</td>
  </tr>
  <tr> 
    <td>org.apache.jetspeed.catalina.version.major</td>
    <td>5</td>
    <td>Are you using Tomcat 5.0.x (use: 5) or 5.5.x? (use: 5.5)</td>
  </tr>
  <tr> 
    <td>org.apache.jetspeed.server.shared</td>
    <td>${org.apache.jetspeed.server.home}/shared/lib/</td>
    <td>The location of the shared jars in your Tomcat installation.</td>
  </tr>
  <tr> 
    <td>org.apache.jetspeed.deploy.war.dir</td>
    <td>${org.apache.jetspeed.server.home}/webapps/</td>
    <td>The location to deploy web application in Tomcat.</td>
  </tr>
  <tr>
    <td>org.apache.jetspeed.services.autodeployment.user</td>
    <td>your-tomcat-manager-user</td>
    <td>a Tomcat user with the manager role.
        See the Tomcat Configuration section below.
    </td>
  </tr>
  <tr>
    <td>org.apache.jetspeed.services.autodeployment.password</td>
    <td>your-tomcat-manager-user-password</td>
    <td>The password of the Tomcat manager user.</td>
  </tr>
</table>
<p>
To develop or deploy Jetspeed with another database (not the default HSQL), see the property configuration in the 
<a href='database.html'>Database Configuration documentation</a>.
</p>
</section>
<section name="3. Tomcat Configuration">
<p>
Jetspeed 2 now can use the Tomcat manager application for managing portlet applications through
its new Portlet Application Lifecycle Manager Portlet.
To be able to do so it needs a configured Tomcat user with the predefined 'manager' role in
the ${CATALINA_HOME}/conf/tomcat-users.xml.
</p>
<p>
A minimal example tomcat-users.xml could look like:
  <source><![CDATA[
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
      <role rolename="manager"/>
      <user username="j2deployer" password="j2deployer" roles="manager"/>
    </tomcat-users>]]>
  </source>
Make sure to use a more appropriate username and password. <br/>
With the above example the required autodeployment properties should be set as:
  <pre>
    org.apache.jetspeed.services.autodeployment.user=j2deployer
    org.apache.jetspeed.services.autodeployment.password=j2deployer
  </pre>
</p>
</section>
<section name='4. Building Jetspeed 2'>
<p>
Build the portal and all components for Jetspeed-2:
</p>
<source test=""><![CDATA[
cd ${jetspeed-2-home}
maven allClean allBuild
]]></source>
</section>
<section name="5. Deploying Jetspeed into Tomcat">
<p>
We only cover deploying to Tomcat 5 or Tomcat 5.5.
Step #1 below is optional if you are NOT using the default Hypersonic database.
</p>
<ul>
<li>1. If you are using the Hypersonic SQL database, start the production Hypersonic database by typing 
       <br/><br/><b>maven start.production.server</b><br/><br/>
</li>
<li>2. (in seperate window/terminal session) <br></br><br></br><b>cd ${jetspeed-2-home}</b><br></br><br></br>
       <b>maven quickStart</b><br></br><br></br> This will recreate the DB to deploy into.  
       WARNING This will drop all the tables and data in the production database.<br></br><br></br>
</li>
<li>3. Start up Tomcat. With a browser, go to: <br/><br/><b>http://localhost:8080/jetspeed</b><br/>
</li>
</ul>
</section>

</body>
</document>

