Getting Started with Jetspeed 2

It is expected that the user is familiar with both the Apache Maven project tool and the Apache Ant build tool.

Requirements:

1. Get Maven Ready

If you have not already done so, download and install Maven.

NOTE!: There are 2 jars required by Jetspeed that are NOT available direct through Maven which you will have to download manually.

Jar Instructions
JDBC Standard Extensions 2.0 Once downloaded it needs to be renamed to jdbc-se2.0.jar and copied to your ${MAVEN_REPOSITORY}/jdbc-se/jars directory.
JTA 1.0.1 Once downloaded it needs to be renamed to jta1.0.1.jar and copied to your ${MAVEN_REPOSITORY}/jta/jars directory.

Pluto Container

NOTE! You will need to check out the latest CVS build of Pluto, build the driver and copy it to your maven repository.

The pluto jar needs to be named to pluto-1.0.jar and copied to your ${MAVEN_REPOSITORY}/Pluto-container/jars directory.
jxmri and jmxtools
  1. Unzip the jmxri and jmxtools jars into${MAVEN_REPOSITORY}/jmx/jars
  2. Rename jmxri.jar to jmxri-1.2.1.jar
  3. Rename jmxtools.jar to jmxtools-1.2.1.jar

NOTE!: Maven Beta 0.9: eation section

  <j:set var="extensionList" value=""/>
  
  <j:forEach var="artifact" items="${pom.artifacts}">
    <j:set var="dep" value="${artifact.dependency}"/>
    <j:set var="extensionList" value="${extensionList},${dep.artifactId}"/>
  </j:forEach> 
  
  <j:if test="${extensionList.length() != 0}">
    <j:set var="extensionList" value="${extensionList.substring(1)}"/>
    <ant:attribute name="Extension-List" value="${extensionList}"/>
  </j:if>

  <j:forEach var="artifact" items="${pom.artifacts}">
    <j:set var="dep" value="${artifact.dependency}"/>
    <ant:attribute name="${dep.artifactId}-Extension-Name" value="${dep.artifactId}"/>
    <ant:attribute name="${dep.artifactId}-Implementation-Version" value="${dep.version}"/>
    <ant:attribute name="${dep.artifactId}-Implementation-URL" value="http://www.ibiblio.org/maven${artifact.urlPath}"/>
  </j:forEach> 

NOTE!: Maven Beta 0.9 and greater:

In ${jetspeed-2-home}/portal:

  1. Rename the existing maven.xml file to maven-0.8.xml
  2. Rename maven-0.9-and-up.xml to maven.xml

2. build.properties settings:

Please set these values in your ${USER_HOME}/build.properties file:

property example what is it?
catalina.shared.lib ${CATALINA_HOME}/shared/lib/ The location of the jars in your Tomcat installation.
deploy.war.dir ${CATALINA_BASE}/webapps/ The location to deploy web application in Tomcat.
deployment.db.alias ${CATALINA_BASE}/webapps/jetspeed/WEB-INF/db/hsql/Registry The location of HypersonicSQL database file that will contain Jetspeed information like registries and user info.

Step 3 is no longer required as we are accomplishing this with an additional jetspeed.xml file copied to the webapps directory at deploy time.
3. Changes to Tomcat's server.xml

NOTE: This step is no longer necessary if you use the "deploy" goal from the portal project. The "deploy" goal handles adding the cross context property.

Edit ${CATALINA_BASE}/conf/server.xml, add this line:
(this only needs to be done once)

<Context path="/jetspeed" docBase="jetspeed" crossContext="true"/>

This will allow the jetspeed app to load your deployed portlet applications.

4. Build .jar and .war files

There are two procedures you can follow that will yeild the same results which are to build and install the required jetspeed jars into Maven (for build purposes).

procedure 1 (short and sweet) procedure 2 (long and boring)

Build all jars and wars:
cd ${jetspeed-2-home}
maven allBuild

Build Portlet-API
cd ${jetspeed-2-home}/portlet-api
maven jar:install
Build Jetspeed Commons
cd ${jetspeed-2-home}/commons
maven jar:install
Build the demo web application
cd ${jetspeed-2-home}/applications/demo
maven war
Build Jetspeed Portal
cd ${jetspeed-2-home}/portal
maven war
Install into Catalina Shared
cd ${jetspeed-2-home}
maven catalina:base-shared
maven catalina:shared


5. Deploying Jetspeed 2

Deploy Jetspeed Portal WAR into Catalina

  1. cd ${jetspeed-2-home}/portal
  2. maven deploy

This will unpack the newly created jetspeed.war file into Tomcat/Catalina

6. Deploying the demo application

Install the demo web application into Catalina

  1. cd ${jetspeed-2-home}/portal
  2. maven pam.deploy
  3. The console witll stay open with [done] message, at this point you can ctrl-c to close the deployment tool.

 

7. Start Tomcat

Run Tomcat, go to http://localhost:8080/jetspeed.

(Optional) How to undeploy the demo application

To undeploy the demo app

  1. cd ${jetspeed-2-home}/portal
  2. maven pam.undeploy
  3. The console witll stay open with [done] message, at this point you can ctrl-c to close the deployment tool.

 

Addendum

Some users have experienced a problem where the portlet-container jar isn't the latest one copied into the HW_APP webapp
this causes HelloPortlet to not display any info
Its easily fixed by manually copying
${MAVEN_REPOSITORY}/jetspeed2/jars/jetspeed-container-2.0-a1-dev.jar ${catalina.home}/webapps/HW_APP/WEB-INF/lib/