Fork me on GitHub

Installation

Bloomreach Forge Maven Repository Configuration

Make sure you have the Maven2 Forge repository reference in the root pom.xml of your project.


          <repositories>

            <!-- SNIP -->

            <repository>
              <id>bloomreach-maven2-forge</id>
              <name>Bloomreach Maven 2 Forge Repository</name>
              <url>https://maven.bloomreach.com/maven2-forge/</url>
            </repository>

            <!-- SNIP -->

          </repositories>
        

Dependency Management

Version Requirements

Warning: <scope>test</scope> is required. BRUT replaces core HST beans (pipelines, component manager, link creator, etc.) with test-oriented implementations. If BRUT is on the runtime classpath without test scope, its mock beans will shadow production beans and real HST endpoints will stop working. Always declare BRUT dependencies with <scope>test</scope>.

Recommended: Use BRUT 5.1.0+ with JUnit 5 for annotation-based testing support (@BrxmPageModelTest, @BrxmJaxrsTest)

  • BRUT 5.1.0+ - Annotation-based testing API, ConfigServiceRepository, 66-74% less boilerplate
  • BRUT 5.0.x - Multi-test support, thread-safe initialization, JUnit 4 and 5 support
  • JUnit 5 - Required for annotation-based testing (JUnit 4 still supported for legacy abstract classes)

JUnit 5 Dependency (Required for Annotation-Based Testing)

Annotation-based testing (@BrxmComponentTest, @BrxmJaxrsTest, @BrxmPageModelTest) requires JUnit 5:


            <dependency>
              <groupId>org.junit.jupiter</groupId>
              <artifactId>junit-jupiter</artifactId>
              <version>5.10.2</version>
              <scope>test</scope>
            </dependency>
          

Note: Most brXM projects already include JUnit 5. Check your parent POM or dependency management section.

Component Testing Dependencies

In either site/components/pom.xml in projects created on brXM v13 or later or site/pom.xml in projects created on earlier versions, add the following dependency:


            <dependency>
              <groupId>org.bloomreach.forge.brut</groupId>
              <artifactId>brut-components</artifactId>
              <version>${brut.version}</version>
              <scope>test</scope>
            </dependency>
          

Headless Testing Dependencies

In either site/components/pom.xml in projects created on brXM v13 or later or site/pom.xml in projects created on earlier versions, add the following dependency:


            <dependency>
              <groupId>org.bloomreach.forge.brut</groupId>
              <artifactId>brut-resources</artifactId>
              <version>${brut.version}</version>
              <scope>test</scope>
            </dependency>