Enabling Your Project For Replication - BloomReach Experience - Open Source CMS
07-01-2019

Enabling Your Project For Replication

Enabling your project for replication is a bit more involved than simply adding the right artifacts and tweaking the configuration.

The replication source distribution will be different from the replication target distribution in that they contain different components and configuration to fulfil their respective tasks. We will have to create different CMS web archives for the source and the target. You can choose to do this by creating separate modules for both, or, in the spirit of code reuse, work with maven profiles. We use the latter method in our exposition here.

 

Replication Source Distribution

The replication source is the cluster where CMS users log in and edit and publish documents, and where web masters work with the Channel Editor to change the way the site looks and behaves. It will contain the CMS application for editing documents, the Site application necessary for previewing and editing channels and templates, and a Hippo Repository backing both.

The following dependency is required to include the artifacts that contain the code for running a replication source in your CMS application:

        <dependency>
          <groupId>com.onehippo.cms7</groupId>
          <artifactId>hippo-addon-replication-source-dependencies</artifactId>
          <type>pom</type>
        </dependency>

Add this dependency to a profile called replication-source in the cms pom:

    <profile>
      <id>replication-source</id>
      <dependencies>
        <dependency>
          <groupId>com.onehippo.cms7</groupId>
          <artifactId>hippo-addon-replication-source-dependencies</artifactId>
          <type>pom</type>
        </dependency>
      </dependencies>
    </profile>

In order to build the source distribution, issue the following command sequence from the root of your project:

$ mvn clean install -Preplication-source
$ mvn clean install -Pdist

Replication Target Distribution

The replication target is the cluster that lives inside the DMZ and hosts the live web site. It will contain a CMS application for administrative purposes, the Site application for serving web pages.

The following dependency is required to include the artifacts that contain the code for running a replication target in your CMS application:

        <dependency>
          <groupId>com.onehippo.cms7</groupId>
          <artifactId>hippo-addon-replication-target-dependencies</artifactId>
          <type>pom</type>
        </dependency>

Add this dependency to a profile called replication-target in the cms pom:

    <profile>
      <id>replication-target</id>
      <dependencies>
        <dependency>
          <groupId>com.onehippo.cms7</groupId>
          <artifactId>hippo-addon-replication-target-dependencies</artifactId>
          <type>pom</type>
        </dependency>
      </dependencies>
    </profile> 

In order to build the target distribution, issue the following command sequence from the root or your project:

$ mvn clean install -Preplication-target
$ mvn clean install -Pdist

.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?