Build Bloomreach Content From Source
Introduction
Goal
Build any Bloomreach Content Developer Edition open source project from source.
Background
Bloomreach Content Developer Edition releases are available as open source. You can rebuild any project included in a Developer Edition release from source. You may also fork and modify the code, for example, to fix bugs or contribute improvements as patches.
Bloomreach provides Git repositories for release tags only. Code changes in development for upcoming releases are not published to the community Git repositories. To identify the tag for a specific Bloomreach Content release, review the Bloomreach Content release POM used by your project. This is the parent POM for most projects, or the grandparent POM in some cases. You can also determine the version by running mvn dependency:tree in your project.
Prerequisites
Install the following tools before building Bloomreach Content components:
Build a Core Bloomreach Content Open Source Project Release Tag from Source
Bloomreach Content is organized into multiple Maven projects. This structure reduces build time when you work on a specific sub-project.
The Bloomreach Content Monorepo
Versions released from July 2020 onward are available as a GitHub monorepo. The monorepo contains all Maven projects related to Bloomreach Content. Each product release is tagged in the repository, allowing you to work with the complete codebase or individual projects from a single source.
An aggregator pom.xml is included to support building the entire product with one Maven command. To check out and build the first monorepo release of brXM 14.2.2, run:
$ git clone https://github.com/bloomreach/brxm.git
$ cd brxm
$ git checkout brxm-14.2.2
$ mvn clean install -DskipTests -DskipITs -T1C
The -D parameters are optional but reduce build time. Multi-threaded builds using -T are supported only when integration tests are disabled with -DskipITs.
During the monorepo migration, all internal dependencies use the hippo.release.version property, defined in project/pom.xml. To change the product version in a monorepo release, update the version in two steps. You can automate this process with a script:
#!/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 Content Developer Edition, you agree to the open source license and the licenses of included components. For details, see the licenses page.
Bloomreach Content Developer Edition is licensed under the Apache Software License 2.0. All bundled libraries use either the Apache Software License 2.0 or a compatible license, except for Sencha ExtJS. Sencha ExtJS is distributed under GPL v3 with an Open Source License Exception for Applications. If you customize or redistribute code that uses ExtJS components, you must comply with their open source licenses or purchase a developer license from Sencha.
Modify Bloomreach Content
To modify a Bloomreach Content project, create a fork branch from the relevant release tag.
Clone the repository:
$ git clone https://github.com/bloomreach/brxm.git
Create a new local development branch based on the release you want to modify. For example, to fork version 14.7.3:
$ cd brxm
$ git checkout -b forked-14.7.3 brxm-14.7.3
Update the POM versions in your forked project:
$ mvn release:update-versions -DautoVersionSubmodules -DdevelopmentVersion=14.7.30-forked-SNAPSHOT
You can now modify the source code.
After making your changes, build the project:
$ mvn clean install
To test your changes in your implementation project, override the version property for the modified project in the implementation project's root pom.xml:
<hippo.repository.version>14.7.3-forked-SNAPSHOT</hippo.repository.version>
Rebuild the implementation project:
$ mvn clean verify
Use JRebel
If you use JRebel, you can speed up the development cycle.
Build the core projects with the JRebel switch enabled:
$ mvn -DskipTests -Djrebel clean install
Build the gettingstarted project as usual, and start it with the JRebel switch:
$ mvn -Pcargo.run -Djrebel
Frontend Development
For CMS frontend development with automated builds, refer to the README in the relevant projects or modules.