weaver 2003/07/31 09:26:37 Added: docs GETTING-STARTED.html OLD-GETTING-STARTED.txt Log: New, upadted getting started document in HTML form Revision Changes Path 1.1 jakarta-jetspeed-2/docs/GETTING-STARTED.html Index: GETTING-STARTED.html =================================================================== Untitled Document

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! as of last writing of this document, the Pluto jar is unavailable to non-committers. This will change as soon as IBM feels Pluto is ready for prime time.

The pluto jar needs to be named to pluto-0.46.jar and copied to your ${MAVEN_REPOSITORY}/Pluto-container/jars directory.

NOTE!: Maven Beta 0.9:
Delete all of these lines from the jar creation 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 you 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.


3. Changes to Tomcat's server.xml

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 Container
cd ${jetspeed-2-home}/container
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

7. Start Tomcat

Run Tomcat, go to Jetspeed

(Optional) How to undeploy the demo application

To undeploy the demo app

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

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/

1.1 jakarta-jetspeed-2/docs/OLD-GETTING-STARTED.txt Index: OLD-GETTING-STARTED.txt =================================================================== ---------------- GETTING STARTED ---------------- Requirements ------------- 1. Ant 1.5 or higher 2. Maven 0.8 or higher Maven Beta 9 Note: Delete all of these lines from the jar creation section 3. Java 1.3 or higher 4. Servlet 2.3 Tomcat 4.1.18-LE w/JDK 1.4 Tomcat 4.1.24 w/ JDK 1.3 5. Define the following in the user's build.properties catalina.shared.lib = ${CATALINA_HOME}/shared/lib/ deploy.war.dir = ${CATALINA_BASE}/webapps/ deployment.db.alias=${CATALINA_BASE}/webapps/jetspeed/WEB-INF/db/hsql/Registry 6. Edit ${CATALINA_BASE}/conf/server.xml, add this line: (this only needs to be done once) --------------------------------------------- Building - instructions as of July 31, 2003 --------------------------------------------- You can either run step 1a or 1b. The end result will be the same. 1a. Build all jars and wars: cd {$jetspeed-2-home} maven allBuild OR 1b Build all jars and wars in steps 1. Build Portlet-API cd {$jetspeed-2-home}/portlet-api maven jar:install 2. Build Jetspeed Commons cd {$jetspeed-2-home}/commons maven jar:install 3. Build Container cd {$jetspeed-2-home}/container maven jar:install 4. Build the demo web application cd {$jetspeed-2-home}/applications/demo maven war 5. Build Jetspeed Portal cd {$jetspeed-2-home}/portal maven war 2. Install into Catalina Shared cd {$jetspeed-2-home} maven catalina:base-shared maven catalina:shared 3. Deploy Jetspeed Portal WAR into Catalina cd {$jetspeed-2-home}/portal maven deploy 4. Install the demo web application into Catalina cd {$jetspeed-2-home}/portal maven pam.deploy 5. Run Tomcat, go to Jetspeed 6. To undeploy the demo app cd {$jetspeed-2-home}/portal maven pam.undeploy NOTE: im experience 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.repo.home}/jetspeed2/jars/jetspeed-container-2.0-a1-dev.jar ${catalina.home}/webapps/HW_APP/WEB-INF/lib/ I also think that this jar should not be put in the WAR during WAR creation, but should either be: a) in catalina shared or b) merged into the deployed web app by the PAM --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org