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>.

Annotation-based testing (@BrxmComponentTest, @BrxmJaxrsTest, @BrxmPageModelTest) requires JUnit Jupiter. JUnit 4 is still supported for the legacy abstract class approach.

  • BRUT 6.0.0+ — brXM 17.0.0 and Java 21; JUnit Jupiter 6.x (managed by brXM parent POM)
  • BRUT 5.1.0+ — Annotation-based API (@BrxmComponentTest, @BrxmJaxrsTest, @BrxmPageModelTest) with auto-detection and fluent request builder
  • BRUT 5.0.x — Multi-test support, thread-safe initialization, JUnit 4 and 5 support
  • JUnit Jupiter — Required for annotation-based testing; JUnit 4 still supported for legacy abstract classes

JUnit Jupiter Dependency (Required for Annotation-Based Testing)

Annotation-based testing (@BrxmComponentTest, @BrxmJaxrsTest, @BrxmPageModelTest) requires JUnit Jupiter (6.x for brXM 17+):


            <!-- JUnit Jupiter is typically managed by the brXM parent POM; only add explicitly if missing -->
            <dependency>
              <groupId>org.junit.jupiter</groupId>
              <artifactId>junit-jupiter</artifactId>
              <scope>test</scope>
            </dependency>
          

Note: Most brXM projects already include JUnit Jupiter. 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>