Added by Jeremy Quinn, last edited by Niels van Kampenhout on Apr 11, 2007  (view change) show comment

Labels:

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

Here we describe how to get the Hippo CMS source code from our versioning system, and how you can build, install and run it.

If you would like to build a custom version of the Hippo CMS or review the code, you will need to checkout the sourcecode from our Subversion Repository.

Getting a Subversion Client

To be able to get the source code for the Hippo Projects, you will need a client for Subversion, the versionning system.

Subversion Clients

The official subversion site: http://subversion.tigris.org/

The windows client Tortoise: http://tortoisesvn.tigris.org/

The windows client RapidSVN http://rapidsvn.tigris.org/

The eclipse plugin: http://subclipse.tigris.org/

SVN Documentation

The official SVN Documentation : http://svnbook.red-bean.com/

Getting Code

How to get all of the Hippo Code

Subversion Repository

The public Hippo SVN repository is located at :

http://svn.hippocms.org/repos/hippo

Hippo Projects

Hippo's CMS System is made up of several projects kept separately in Hippo's Subversion Repository.

This includes tools to assist in doing builds and initialisation, sample sites, a wrapper for starting the different processes, a pre-built Cocoon and the main Hippo components themselves (Hippo Repository and Hippo CMS).

Here is how to check out a copy of the current code

Somewhere to put it (an example)

cd ~/
mkdir hippo
cd hippo

Build Tools

svn co http://svn.hippocms.org/repos/hippo/hippo-fortress/trunk hippo-fortress
svn co http://svn.hippocms.org/repos/hippo/hippo-tools/repository-initialization/trunk hippo-tools/repository-initialization

The main Hippo Components

svn co http://svn.hippocms.org/repos/hippo/hippo-repository/trunk hippo-repository
svn co http://svn.hippocms.org/repos/hippo/hippo-cms/trunk hippo-cms

Cocoon

svn co http://svn.hippocms.org/repos/hippo/hippo-cocoon/trunk hippo-cocoon

Samples

svn co http://svn.hippocms.org/repos/hippo/hippo-cms-site-sample/trunk hippo-cms-site-sample
svn co http://svn.hippocms.org/repos/hippo/hippo-site-skeleton/trunk/ hippo-site-skeleton

Installing Maven Hippo-Cocoon plugin

How to install the Hippo Cocoon Maven plugin, so you can build your own Hippo Site projects, made from the Hippo Site Skeleton.

Hippo Cocoon Maven plugin

The Hippo Cocoon plugin is a Maven plugin to assist you to build and deploy your Maven-based Hippo Site projects. It uses pre-built distributions of Cocoon to simplify development.

Get Maven

This plugin is designed for Maven 1.0.n, if you do not already have it, the latest version, currently 1.0.2, can be downloaded from http://maven.apache.org/maven-1.x/start/download.html. Decompress the archive to a suitable location. Add this location as MAVEN_HOME to your environment variables and for convenience, add it to the $PATH variable.

In your user directory, create a build.properties file and add the following line

maven.repo.remote=http://repository.hippocms.org/maven/,http://repo1.maven.org/maven/

The Maven Hippo Cocoon plugin is currently incompatible with both Maven 1.1(-beta) and Maven 2.

Java 5 users need to place xalan-2.6.0.jar in the $MAVEN_HOME/lib/endorsed directory.

Plugin Installation

maven plugin:download -Dversion=2.01.01 -DartifactId=hippo-cocoon-plugin -DgroupId=hippo-cocoon

The current version is 2.01.01 (updated 2007-08-21). You can check in the Hippo public repository: http://repository.hippocms.org/maven/hippo-cocoon/plugins/ for updates.

The above command will download the plugin from the Hippo repository and store it in your local repository. This only needs doing once.

Windows users should also install Patch.

Sometimes maven refuses to download and install the new plugin. You'll need to delete the plugin on your computer in three places:

Linux and MacOSX

  1. ~/dev/maven/plugins (or wherever you installed maven)
  2. ~/.maven/cache (change username)
  3. ~/.maven/repository/hippo-cocoon/plugins

Windows

  1. C:\apache\maven\plugins (or where you installed maven)
  2. C:\Documents and Settings\username\.maven\cache
  3. C:\Documents and Settings\username\.maven\repository\hippo-cocoon\plugins

Installed Blocks

The pre-built distributions of Cocoon have a certain set of blocks built in.
You can see the list by looking at the project.xml file in the SVN repository for the plugin. http://svn.hippocms.org/repos/hippo/hippo-cocoon/trunk/server/project.xml.

If your project needs more blocks, add the new dependencies for these blocks to the project.xml of the Site Skeleton (see below).

Configuring Hippo CMS

The Hippo CMS is very configurable, here are some of the settings.

Jetty Properties

Property name Optional? Description
maven.jetty.port Yes Specifies the port jetty should listen on. (Default is 8888)
maven.jetty.maxformcontentsize Yes Limits the size of the data a client can push at the server (Default is 200000 bytes)

Cocoon properties

Site properties

Property name Optional? Description
maven.cocoon.site.domain No Sets domain HippoCMS will be running on.
maven.cocoon.site.version Yes Sets the HippoCMS version.
maven.cocoon.site.displayname Yes Sets the displayname that is used by the CMS.
maven.cocoon.site.name No Sets the name for the configured site. This name will be written into the sites.xconf.

Repository properties

Property name Optional? Description
maven.cocoon.repository.name No Sets the name of the repository used by the repository.xconf.
maven.cocoon.repository.port No Sets the port Hippo-repository is running on.
maven.cocoon.repository.host No Sets the host Hippo-repository is running on.
maven.cocoon.repository.filespath No Sets the filespath for the repository. (Should look something like: /files/${maven.cocoon.repository.name}.preview)
maven.cocoon.repository.rootpath No Sets the rootpath for the repository. (Should look something like: /$
{maven.cocoon.repository.name}
maven.cocoon.repository.authenticationrealm No Sets the repository authentication realm.
maven.cocoon.repository.systemcredentials.username No Sets the repository user.
maven.cocoon.repository.systemcredentials.password No Sets the password for the repository user.

Global cocoon memory settings

Please take extreme care when setting the build.properties of your Cocoon project.

Always make sure to configure both maven.wrapper.maxmemory (in mb's) and maven.cocoon.heapsize (in bytes, 20 mb lower).
Property name Optional Default Description
maven.wrapper.initmemory No 64 Sets the amount of memory in megabytes the JVM initially gets assigned by the Wrapper. This is patched into /bin/wrapper.conf. 64 is a good start - no real need to make this higher.
maven.wrapper.maxmemory No 128 Sets the maximum mount of memory in megabytes the JVM assigns to the Wrapper. This is patched into /bin/wrapper.conf. 128 is pretty standard, but values anywhere between 128 and 512 are common. Whenever you change this value, immidiately change the maven.cocoon.heapsize too!
maven.cocoon.heapsize No 108000000 Sets the maximum amount of memory Cocoon's (cache) store takes from within the JVM in bytes. This is patched into /cocoon/WEB-INF/cocoon.xconf. Take extreme care with the amount of zero's assigned - it's in bytes! This value should be approximately 20mb lower than maven.wrapper.maxmemory.
maven.cocoon.store.maxobjects No 1100 Sets the maximum number of objects stored by Cocoon in store in the {{/cocoon/WEB-INF/cocoon.xconf }}
DEPRECATED SINCE HIPPO COCOON 2.1.8.11
maven.cocoon.transientstore.maxobjects No 1200 Sets the maximum number of objects stored by Cocoon in transient-store in the {{/cocoon/WEB-INF/cocoon.xconf }}
DEPRECATED SINCE HIPPO COCOON 2.1.8.11
maven.cocoon.continuations.ttl No 3600000 Sets the number of seconds a continuation should live. Patched into the /cocoon/WEB-INF/cocoon.xconf
timeToLiveSeconds yes 0
timeToIdleSeconds yes 10800

CMS properties

Property name Optional? Description
cms.model No This tells the CMS where it can find its documenttypes. Should look something like: context://types/types.xml or repository://types/types.xml
cms.preview.url Yes This tells the CMS the preview url. If an empty value is used, the preview button in the CMS will dissapear.
cms.fileimportservice.url Yes This tells the CMS the fileimportservice url. If an empty value is used, the fileimport button in the CMS will dissapear.
cms.autonomy.url Yes This tells the CMS the url for autonomy. If an empty value is used, the autonomy button in the CMS will dissapear.
cms.perspectives.search No This will tell the CMS if it uses the search perspective. Values can be off or on.
cms.history.actions No This will tell the CMS if it uses history actions. Values can be off or on.
cms.use.trash.bin Yes This will tell the CMS to move deleted items to the trash bin or not. Value can be 'off' or 'on'.
cms.use.locking
Yes This will tell the CMS to lock documents while they are being edited. Value can be 'off' or 'on'.
cms.tree.sortby
Yes This will tell the CMS left tree panel to order on which property. Default 'caption'.
cms.tree.sortorder
Yes This will tell the CMS left tree panel how to order. Default 'ascending'
cms.tree.paging
Yes Since Hippo CMS version 6.05.03. This will tell the CMS documents and assets listing to use paging. Default 'true'
cms.tree.pagesize
Yes Since Hippo CMS version 6.05.03. This will set the # of pages that will be displayed per page when paging is enabled. Default '20'
cms.inline-upload.maxsize
No Control the maximum size of inline-uploaded images. Default is '40' KB
cms.linkchecker.active
No Since Hippo CMS version 6.05.01. Enable the linkchecker background task, which checks both internal and external links in all XML documents. Default is 'false'. See documentation
cms.linkchecker.cron
No Since Hippo CMS version 6.05.01. A cron expression desribing when the linkchecker background task will run. Default is daily at 3:30 AM. See documentation
cms.linkchecker.interval
No Since Hippo CMS version 6.05.01. The period (in seconds) in which the linkchecker background task will run. Default is '86400' (which is one day). See documentation
cms.startup.function
Yes Since Hippo CMS version 6.05.03. This will tell the CMS what flowscript function to use to start the CMS, default is 'start'. See documentation

Project specific properties

Property name Optional? Description
cms.project-specific.sitemap Yes This property points to a project specific sitemap, which is mostly used for custom processing in combination with the editor. Default value is repository://configuration/project-specific/sitemap.xmap.
cms.project-specific.i18n-htmlarea-popups Yes When using HTMLArea (e.g. in CForms XML Editor), this property determines whether to use i18n popups (true) or use the original CForms popups(false). Default is false. DEPRECATED SINCE 6.03.00

Workflow properties

Workflow quartzscheduler configuration

Property name Optional? Description
cms.datasource.quartz.name Yes This tells the cronjob what databasename to use.
cms.datasource.quartz.url Yes This tells the cronjob the connection string to the database. Should look something like jdbc:mysql://{host}/osworkflow_{projectname}?characterEncoding=latin1
cms.datasource.quartz.user Yes This tells the cronjob usercredentials for the database.
cms.datasource.quartz.password Yes This tells the cronjob usercredentials for the database.

Workflow store configuration

Property name Optional? Description
workflow.localdevdomains No Sets the domain the cms is running on.
workflow.localdevWorkflow.datasource.url Yes This tells the workflow the connection string to the database. Should look something like jdbc:mysql://{host}/dev_projectdata
workflow.localdevWorkflow.datasource.username Yes This tells the workflow usercredentials for the database.
workflow.localdevWorkflow.datasource.password Yes This tells the workflow usercredentials for the database.
workflow.localdevWorkflow.datasource.driver Yes
This sets the datasource driver. Should be something like org.hsqldb.jdbcDriver
cms.workflow.store.role Yes Sets workflow store role. Should be something like: com.opensymphony.workflow.spi.WorkflowStore/mysql
cms.workflow.store.class Yes Sets workflow store class. Should be something like: nl.hippo.workflow.store.ExcaliburMySQLWorkflowStore
cms.workflow.store.datasource.name Yes Sets workflow store datasource name.

Lucene properties

Property name Optional? Description
lucene.index.path Yes Sets the path where the lucene index can be found.

Debug properties

Property name Optional? Description
log4j.loglevel No Used to set the debuglevel. Possible values: INFO,WARN,ERROR,DEBUG
logkit.cms.loglevel No Used to set the CMS debuglevel. Possible values: INFO,WARN,ERROR,DEBUG

Building Hippo CMS

Environment Variable

Make sure you have an environment variable set for COCOON_HOME, pointing to the location of your Cocoon installation.

Build the ant tasks:

cd hippo-cocoon/anttasks
maven

Extra dependencies

Before building the CMS, you will need to download some dependencies that may not be redistributed:
JTA 1.0.1B (Download Class Files 1.0.1B, unzip, then jar cvf jta-1.0.1B.jar javax, copy the jar to ~\.maven\repository\jta\jars)
JavaMail 1.3.2 (Download zip, copy mail.jar to ~\.maven\repository\javamail\jars\javamail-1.3.2.jar)
JavaBeans Activation Framework 1.0.2 (Download zip, copy activation.jar from zip to ~\.maven\repository\activation\jars\activation-1.0.2.jar)
JDO (download the Final Draft zipfile, and unzip jdo.jar to ~\.maven\repository\jdo\jars\jdo-1.0.1.jar)

If you are working on a Windows based machine you will need GNU Patch. Make sure that it's installed before you start installing the CMS. You will need to put GNU Patch in your environment variable 'PATH'.

Build Hippo CMS

$ cd hippo-cms/editor
$ maven clean cocoon:deploy

Launching Hippo CMS

If this is your first run, make the startup scripts executable, then execute them. In a new console, type:

cd ~/hippo/hippo-cms-[STAGING:version]/bin
chmod u+x fortress.sh wrapper.bin libwrapper.so
./fortress.sh start

NB. Windows Users, Linux Users, MacOSX Users.

Testing Hippo CMS

Now you can see if it is working

  • Open a webbrowser and navigate to http://localhost:50000
  • You should get a popup asking for a username and password
  • Enter the username "root" and password "password"
  • Congratulations, your Hippo CMS is running!

NB. The Hippo CMS is not currently usable in Safari on MacOSX.