How Property Merging Works in the Tutorial

You may be wondering why the tutorial works with only a few properties, and why we have our own versions of the configuration-property files. The reason is that Jetspeed does not have a standard way to deploy portlet applications, thus with version 1.x we have to merge property files in order for a portal application to override and define its own configuration properties, and also to avoid editing the Jetspeed property files everytime they are modified in the CVS.

The Jetspeed Plugin file in the JPortal source is capable of doing just that. It merges the JPortal Tutorial configuration files shown below on the left into the master Jetspeed resource files on the right:

Tutorial Configuration (Merge) File Jetspeed Configuration (Master) File merge to... merge to... merge to... merge to...

The merge program is included in the Jetspeed Plugin. The general rules for merging properties are:

  • 1. A property in the Master File with the same name as a property in the Merge File will be overwritten by the Merge File property. **
  • 2. Properties from the Merge File that are not found in the Master File will be added to the Master File.
  • 3. Properties will be removed from the Master File if they match the property name prefix-strings described below.

** with the exception of the include directive and property, which are added since there can be multiple include directives or module.packages properties.

Removing Properties

There are many properties in the default Jetspeed configuration that arent used by many sites. For instance, the RSS and OCS support, which requires background threads to be running, can automatically be removed by merging them out of the master properties file. This is accomplished using a remove directive and prefix strings in your merge property file:


Any line that begins with a dash "-" will instruct the property merger to remove a property starting with the given prefix string immediately following the dash. The prefix-string can include comments (or all comments).