Installing brX Content Search

Introduction

You can install the Content Search Addon module through Essentials as described in the first section below. If necessary, you can also install it manually as described in the following section.

Install with Essentials

Visit Essentials at http://localhost:8080/essentials/ and click on "Install feature" button to install Content Feed Add-on module.

Manual Installation

In the main pom.xml of your project, make sure you are using the enterprise version 14.3.1 or higher.

The Content Feed depends on the CRISP Add-on, make sure to set it up first.

In the same file, add a new property in the properties section, using the version number appropriate for the brXM version used in the project. For example:

<hippo.addon-content-feed.version>14.3.1</hippo.addon-content-feed.version>

Add Maven Dependency to CMS

The addon needs to be installed in the cms application. Add the following dependency to cms-dependencies/pom.xml:

<dependency>
   <groupId>com.onehippo.cms7</groupId>
   <artifactId>hippo-addon-content-feed-dependencies-cms</artifactId>
   <version>${hippo.addon-content-feed.version}</version>
   <type>pom</type>
</dependency>

Additional Dependencies

In case your project uses the Selections or Taxonomy plugins, a few additional dependencies are needed in the same cms-dependencies/pom.xml file. Before adding these, please check whether they are already present.

For the Taxonomy plugin:

<dependency>
   <groupId>org.onehippo.cms7</groupId>
   <artifactId>hippo-plugin-taxonomy-hst-api</artifactId>
   <version>${hippo.plugin.taxonomy.version}</version>
</dependency>

<dependency>
   <groupId>org.onehippo.cms7</groupId>
   <artifactId>hippo-plugin-taxonomy-hstclient</artifactId>
   <version>${hippo.plugin.taxonomy.version}</version>
</dependency>

For the Selections plugin:

<dependency>
   <groupId>org.onehippo.cms7</groupId>
   <artifactId>hippo-plugin-selections-hst-client</artifactId>
   <version>${hippo.plugin.selections.version}</version>
</dependency>

Installng the Content Search module

To use the Fluent Query API in the site webapp, the search module of the addon needs to be installed in the site application. The following steps are required:

Add Maven Dependency to SITE

Add the following dependency to site/components/pom.xml:

<dependency>
   <groupId>com.onehippo.cms7</groupId>
   <artifactId>hippo-addon-content-feed-dependencies-site</artifactId>
   <version>${hippo.addon-content-feed.version}</version>
   <type>pom</type>
</dependency>

Deploy Content Search API As Shared Module

The Content Feed Search API dependency (com.onehippo.cms7:hippo-addon-content-feed-search-api) must be shared between web applications

Modify the cargo.run profile

The JAR dependency must be configured to be deployed onto the shared classpath in the cargo.run profile, so you can provide the shared JAR file through the Tomcat container when running with mvn -Pcargo.run.

Add the dependency in the cargo container configuration with shared classpath settings like the following:

<profile>
  <id>cargo.run</id>
  <dependencies>
    <!-- SNIP -->
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.cargo</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <configuration>
          <configuration>
            <!-- SNIP -->
          </configuration>
          <deployables>
            <!-- SNIP -->
          </deployables>
          <container>
            <systemProperties>
              <!-- SNIP -->
            </systemProperties>
            <dependencies>
              <!-- SNIP -->
              <dependency>
                <groupId>com.onehippo.cms7</groupId>
                <artifactId>hippo-addon-content-feed-search-api</artifactId>
                <classpath>shared</classpath>
              </dependency>
              <!-- SNIP -->
            </dependencies>
          </container>
        </configuration>
      </plugin>
    </plugins>
  </build>
</profile>

Modify the dist profile

The shared JAR dependency must be packaged into the shared classpath (i.e. shared/lib) when creating a tar.gz file through the dist profile.

Add the dependency in the src/main/assembly/shared-lib-component.xml like the following:

<component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd">
  <dependencySets>
    <dependencySet>
      <useProjectArtifact>false</useProjectArtifact>
      <outputDirectory>shared/lib</outputDirectory>
      <scope>provided</scope>
      <includes>
        <!-- SNIP -->
        <include>com.onehippo.cms7:hippo-addon-content-feed-search-api</include>
        <!-- SNIP -->
      </includes>
    </dependencySet>
  </dependencySets>
</component>
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?