Fork me on GitHub

Installation

Prerequisites

This section assumes a standard Hippo CMS or BloomReach Experience project using Maven with a root pom and modules CMS and site. This addon allows for pluggable Web Archive managers and it is shipped with 2 built-in managers, one for ArchiefWeb and a mock manager for testing purposes. While installing, you need to specify which manager you wish to use, please read below.

Root pom: repositories, version management and dependency management

  1. In the main pom.xml of the project, in the repositories section, add this repository if it is not configured there yet.

        <repository>
          <id>hippo-forge</id>
          <name>Bloomreach Forge maven 2 repository.</name>
          <url>https://maven.onehippo.com/maven2-forge/</url>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <releases>
            <updatePolicy>never</updatePolicy>
          </releases>
          <layout>default</layout>
        </repository>
                  
  2. Add the addon version to the main pom.xml of the project

    <webarchiving-addon.version>version.number</webarchiving-addon.version>

    Note: always check for the latest version number and compatibility with the project on the Release Notes page.

  3. It is recommended to use the <dependencyManagement><dependencies> section to set the version of all the addon artifacts. Please pay extra attention to dependencies that need to have a "provided" scope. Depending which manager you want to use, comment and uncomment the corresponding dependencies below:

        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-common</artifactId>
          <version>${webarchiving-addon.version}</version>
          <scope>provided</scope>
        </dependency>
    
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-cms-integration</artifactId>
          <version>${webarchiving-addon.version}</version>
        </dependency>
    
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-hst-url-service</artifactId>
          <version>${webarchiving-addon.version}</version>
        </dependency>
    
        <!--Uncomment to use the ArchiefWeb manager
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-archive-manager-archiefweb</artifactId>
          <version>${webarchiving-addon.version}</version>
        </dependency>-->
    
        <!--The "Tester" manager is now enabled -->
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-archive-manager-tester</artifactId>
          <version>${webarchiving-addon.version}</version>
        </dependency>
                  
  4. Add the "common" artifact as a direct, provided dependency to the <dependencies> section

        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-common</artifactId>
          <scope>provided</scope>
        </dependency>
                  
  5. Add the "common" artifact as a shared lib dependency via the cargo.run profile. If you are creating a distribution, make sure the artifact is also listed in src/main/assembly/shared-lib-component.xml

        <profile>
          <id>cargo.run</id>
          <build>
            <plugins>
              <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <configuration>
                  <container>
                    <dependencies>
                      <dependency>
                        <groupId>org.onehippo.forge</groupId>
                        <artifactId>web-archiving-addon-common</artifactId>
                        <classpath>shared</classpath>
                      </dependency>
                    </dependencies>
                    ...
                  

Installation in CMS module

  1. Add the following dependencies to the cms pom.xml, notice the provided dependency and comment/uncomment the desired Web Archive manager

        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-cms-integration</artifactId>
        </dependency>
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-common</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-archive-manager-tester</artifactId>
        </dependency>
        <!--
            <dependency>
              <groupId>org.onehippo.forge</groupId>
              <artifactId>web-archiving-addon-archive-manager-archiefweb</artifactId>
            </dependency>
        -->
                  

Installation in Site module

  1. Add the following dependencies to the site pom.xml, please notice the provided dependency

        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-common</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.onehippo.forge</groupId>
          <artifactId>web-archiving-addon-hst-url-service</artifactId>
        </dependency>
                  

Logging

  1. To change logging level for the addon, add the following <logger> configuration in conf/log4j-dev.xml and conf/log4j-dist.xml

        <logger name="org.onehippo.forge.webarchiving">
          <level value="info"/>
        </logger>