Fork me on GitHub

Prerequisites

These instruction assume that you have an Hippo CMS project based on the Hippo CMS website archetype, i.e. a Maven multiproject consisting of three submodules: cms, site and content.

Any document type you want to include in a feed should have at least a title field and a date field.

Installation

  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 a property called ${forge.feed.version} to the 'properties' section in the Maven pom.xml file in the root of your project.

    <properties>
      ...
      <forge.feed.version>x.y.z</forge.feed.version>
    </properties>
    

    You can find the correct version of the plugin for your project in the table on the Release Notes page.

  3. Add to the pom.xml of your cms module (cms/pom.xml):

    <dependency>
      <groupId>org.onehippo.forge</groupId>
      <artifactId>feed-cms-addon</artifactId>
      <version>${forge.feed.version}</version>
    </dependency>
  4. Add to the pom.xml of your site module (site/pom.xml):

    <dependency>
      <groupId>org.onehippo.forge</groupId>
      <artifactId>feed-hst</artifactId>
      <version>${forge.feed.version}</version>
      <type>jar</type>
    </dependency>
    
    <dependency>
      <groupId>rome</groupId>
      <artifactId>rome</artifactId>
      <version>1.0</version>
    </dependency>
  5. In your site module, check in the src/main/webapp/WEB-INF/web.xml the context-parameter 'hst-annotated-bean'. It should have an entry for scanning bean classes for the forge like "classpath*:org/onehippo/forge/**/*.class". If it is not present, add it.

    <context-param>
      <param-name>hst-beans-annotated-classes</param-name>
      <param-value>classpath*:org/example/**/*.class
          ,classpath*:org/onehippo/**/*.class
          ,classpath*:com/onehippo/**/*.class
          ,classpath*:org/onehippo/forge/**/*.class
      </param-value>
    </context-param>
  6. In your site module also create /src/main/resources/META-INF/hst-assembly/overrides/feed-rest-services.xml that contains:

            <?xml version="1.0" encoding="UTF-8"?>
            <beans xmlns="http://www.springframework.org/schema/beans"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">
              <import resource="classpath:/org/onehippo/forge/feed/site/jaxrs/feed-rest-services.xml"/>
           </beans>
            
  7. Rebuild your project using Maven.

  8. See the Usage page for further instructions.