Added by Andrew Savory, last edited by (Berry) A.W. van Halderen on Feb 14, 2007  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
Deprecated

The following documentation has been deprecated. When not using the special branch version of the software noted below, you should disregard the out-of-date notes below and instead read the documentation on how to build and deploy on application containers.

This page outlines the process involved in building and using WAR and EAR files of Hippo CMS for use in servlet containers such as Tomcat or Websphere.

First-time setup

The following instructions prepare your build environment for working with the development version of hippo cms.

Warning

Make sure you're running java 1.4.2 and NOT a java 1.5 version. Check with running "java -version" on the command line.

Warning

Building and installing the war versions of hippo-cocoon and servermanager will break other non-war instances of hippo-cms. If you continually see errors related to the smwork configuration directory, make sure you are using the right version of hippo-cocoon and servermanager.

  • install the hippo workflow plugin: maven plugin:download -Dversion=1.01.00b02 -DartifactId=hippo-workflows-plugin -DgroupId=hippo
  • install the hippo fortress plugin: {{maven -Dversion=1.0.dev-9 -DartifactId=fortress-plugin
    -DgroupId=hippo-fortress plugin:download}}

Set up the repository

  • download and run the binary distribution of hippo-repository (tested with 1.2.8)
Configure and build the CMS
  • create a custom build.properties in the editor directory based on the location the war will be running. An example build.properties:
maven.cocoon.site.domain=localhost
maven.jetty.port=

# These settings override the default WEB-INF/ paths
maven.cocoon.servermanager.configurationlocation=context://WEB-INF/configuration
maven.cocoon.servermanager.worklocation=context://WEB-INF/smwork

# This setting overrides the default relative path
maven.cocoon.hsqldb.properties=context://WEB-INF/hsqldb

# This replaces the default nosites
cms.sitesdirectory.configuration=sites/hippo-cms/
maven.cocoon.site.directory=sites/hippo-cms/

maven.cocoon.hsqldb.use=true

# These explicitely setup hsqldb (used?)
maven.cocoon.hsqldb.properties.port=9001
maven.cocoon.hsqldb.properties.silent=true
maven.cocoon.hsqldb.properties.trace=false
maven.cocoon.hsqldb.properties.database0=context://WEB-INF/hsqldb/cocoonscheduler/cocoonscheduler
maven.cocoon.hsqldb.properties.dbName0=cocoonscheduler
maven.cocoon.hsqldb.properties.database1=context://WEB-INF/hsqldb/projectdata/projectdata
maven.cocoon.hsqldb.properties.dbName1=projectdata
maven.cocoon.hsqldb.properties.database2=context://WEB-INF/hsqldb/serverscheduler/serverscheduler
maven.cocoon.hsqldb.properties.dbName2=serverscheduler

logkit.cms.loglevel=DEBUG


cms.types.dir=context://types
cms.types=types.xml

cms.history.actions=
cms.preview.url=

# Build should default to this, but maven appears to use ${pom.artifactId}-${pom.currentVersion}.war instead.
# See http://maven.apache.org/maven-1.x/plugins/war/properties.html for more details.
maven.war.final.name=${pom.artifactId}.war
#cms.workflow.dir=
war.displayname=${pom.artifactId}_war
war.weburi=${pom.artifactId}.war
war.contextroot=/
maven.final.name=editor
  • build using maven war or maven ear depending on your preferred target.

Building the site war

(There is no site skeleton war currently)

Configuring Tomcat

cp target/editor.war $TOMCAT_HOME/webapps/ROOT.war

  • ensure $TOMCAT_HOME/common/endorsed contains
    bcel-5.1.jar log4j-1.2.12.jar xercesImpl-2.7.1.jar
    jakarta-regexp-1.4.jar xalan-2.7.0.jar xml-apis-1.3.02.jar

Configuring Websphere

These notes indicate the settings used to get the Hippo CMS running on a local installation of Websphere 5.1.1.

  • Deploy the war to Websphere:
    • Click on Applications, Install New Application
      • Path: local path: browse to editor.war
      • Context root: /
    • Click Next
    • Bindings: (click Next)
    • Application Security Warnings: (click Continue)
    • Deployment options:
      • Directory: /opt/WebSphere/installableApps
      • Create MBeans for Resources: unchecked
    • Click Next
    • Map virtual hosts: editor.war
    • Map modules: editor.war
    • Click finish
    • Save to master configuration
  • Fix class loading:
    • Applications -> Enterprise Applications -> editor_war -> Configuration -> Classloader mode: PARENT_LAST
    • Applications -> Enterprise Applications -> editor_war -> Configuration -> Related Items -> Web Modules -> editor.war -> Classloader Mode: PARENT_LAST
    • Save to master configuration

Configuring Apache

There is a bug in Websphere that redirects visitors from http://websphere-host/ to http://websphere-host// which will break loading of some pages and scripts within Hippo CMS. To work around this, install an Apache HTTPD proxy in front of Websphere with a configuration similar to the following:

<VirtualHost *>
  ServerName cms.localhost
  ProxyRequests on
  <Proxy *>
    Order Deny,Allow
    Allow from all
  </Proxy>
  ProxyPass / http://localhost:9080//
  ProxyPassReverse / http://localhost:9080//
</VirtualHost>