Build Bloomreach Experience Manager From Source

Introduction

Goal

Build any Bloomreach Experience Manager Developer Edition open source project from source.

Background

Bloomreach provides all Bloomreach Experience Manager Developer Edition releases as open source to the community. Anyone can rebuild any project that is part of a Bloomreach Experience Manager Developer Edition release from source and, if they wish, fork and modify it. The latter is very useful, for example, in case a developer wants to fix a bug or implement an improvement to be provided to the community as a patch.

Bloomreach only provides the Git trees for the release tags of Bloomreach Experience Manager. Code changes which are under development for major, minor, or maintenance releases are not synchronized to the public community Git repositories. To find the tag of a project for a specific Bloomreach Experience Manager release inspect the Bloomreach Experience Manager release POM you are using (this is either the parent POM of your project in the case you using Bloomreach Experience Manager, or the grandparent POM of your project in case you are using Bloomreach Experience Manager) and check the version of the project you are using (you can also find this out by running mvn dependency:tree in your project).

Prerequisites

You need to have the following installed to be able to build all Bloomreach Experience Manager components:

Build a Core Bloomreach Experience Manager Open Source Project Release Tag from Source

The Bloomreach Experience Manager project has been split into a number of Maven projects. This reduces the amount of code that will be rebuilt when only working on a sub-project.

The brXM Monorepo

Versions released in July 2020 or later are distributed on GitHub as a git "monorepo" — a single git repository containing all of the Maven projects related to Bloomreach Experience Manager. All of the code released as part of a cohesive version of the product is tagged together within that git repository, and members of the community can work with the entire codebase or with individual projects using that single source of truth. An aggregator pom.xml file is provided as a convenience for building the entire product with a single Maven command. For example, to check out and build the first monorepo release of Bloomreach Experience Manager 14.2.2, use these commands:

$ git clone https://github.com/bloomreach/brxm.git
$ cd brxm
$ git checkout brxm-14.2.2
$ mvn clean install -DskipTests -DskipITs -T1C

Note that the parameters starting with '-D' are optional, but will result in the fastest build times. Multi-threaded builds with '-T' are currently supported only if integration tests are disabled using '-DskipITs'.

As part of the migration to the monorepo, all internal dependencies were synchronized using the placeholder property 'hippo.release.version', which is defined in the project/pom.xml file. For monorepo releases, changing the version number of the product is a two-step process, which can be automated with a script, like so:

#!/usr/bin/env bash

#
# Updates all maven versions to create distinct artifacts, e.g. for an integration branch.
# Run from the root of the repository, like so:
#
# scripts/set-version.sh 13.4.4-mybranch-SNAPSHOT
#

# helper function to use sed -i on both MacOS and Linux
# See https://stackoverflow.com/a/38595160
sedi () {
    sed --version >/dev/null 2>&1 && sed -i -- "$@" || sed -i "" "$@"
}
export -f sedi

mvn versions:set -DnewVersion=$1 -DgenerateBackupPoms=false -DgroupId=* -DartifactId=*
sedi "s/hippo.release.version>\(.*\)</hippo.release.version>$1</g" 'community/project/pom.xml'

By downloading Bloomreach Experience Manager Developer Edition, you agree to comply with our open source license, as well as the licenses of other components we include in our distribution. For an extensive overview of open source licenses, see our page on licenses.

The code of Bloomreach Experience Manager Developer Edition is licensed under the Apache Software License 2.0. All included libraries are distributed either under the Apache Software License 2.0 or a compatible license, with the exception of the Sencha ExtJS library. Sencha ExtJS is distributed under GPL v3, with an Open Source License Exception for Applications. If you customise or redistribute Bloomreach Experience Manager Developer Edition code that uses ExtJS components, then you must comply to their open source licenses - or buy an appropriate developer license from Sencha.

Modify Bloomreach Experience Manager

If you want to make modifications to a Bloomreach Experience Manager project, create a fork branch from the relevant tag.

Clone the repository:

$ git clone https://github.com/bloomreach/brxm.git

Create a new local fork development branch based on the release you want to modify, for example. 5.3.0:

$ cd brxm
$ git checkout -b forked-14.7.3 brxm-14.7.3

Update the POM versions of your forked project:

$ mvn release:update-versions -DautoVersionSubmodules -DdevelopmentVersion=14.7.30-forked-SNAPSHOT

You are now ready to make modifications to the source code.

Once you have made the modifications, build the project with the following Maven command:

$ mvn clean install

To test your modifications in your implementation project, override the version property for the project you modified in the implementation project's root pom.xml:

<hippo.repository.version>14.7.3-forked-SNAPSHOT</hippo.repository.version>

Then rebuild the implementation project:

$ mvn clean verify

Use JRebel

If you have JRebel installed, you can speed up this development cycle using JRebel.

Simply build the core projects with JRebel switch enabled:

$ mvn -DskipTests -Djrebel clean install

And build the gettingstarted project as before, but start it also with the JRebel switch enabled:

$ mvn -Pcargo.run -Djrebel

Frontend Development

For instructions on how to develop the CMS frontend with automated builds see the README in the relevant projects/modules.

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?