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.
Project Structure and Prerequisites
The Bloomreach Experience Manager project has been split into a number of Maven projects. This allows separate release cycles and reduces the amount of code that will be rebuilt when only working on a sub-project.
You need to have the following installed to be able to build all Bloomreach Experience Manager components:
Build an Archetype Release Tag from Source
$ git clone https://code.onehippo.org/cms-community/hippo-project-archetype.git $ cd hippo-project-archetype $ git checkout hippo-project-archetype-13.4.22 $ mvn clean install
This will build the archetype, which features a pre-built installed Bloomreach Experience Manager implementation project in its target directory with based on the relevant release. To start it:
$ cd main/target/gettingstarted $ mvn -P cargo.run
Build a Core Bloomreach Experience Manager Open Source Project Release Tag from Source
Depending on the project or projects you wish to work on, you can download the source code from the following locations:
- https://code.onehippo.org/cms-community/hippo-repository
- https://code.onehippo.org/cms-community/hippo-cms
- https://code.onehippo.org/cms-community/hippo-site-toolkit
- https://code.onehippo.org/cms-community/hippo-addon-channel-manager
You can use Git to clone one or all of the following source repositories:
- https://code.onehippo.org/cms-community/hippo-repository.git
- https://code.onehippo.org/cms-community/hippo-cms.git
- https://code.onehippo.org/cms-community/hippo-site-toolkit.git
- https://code.onehippo.org/cms-community/hippo-addon-channel-manager.git
These are only the main projects. For the full list of projects see https://code.onehippo.org/groups/cms-community.
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).
$ git clone https://code.onehippo.org/cms-community/hippo-repository.git $ cd hippo-repository $ git checkout hippo-repository-5.2.0 $ mvn clean install -DskipTests
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 a Bloomreach Experience Manager Project
If you want to make modifications to a project, create a fork branch from the relevant tag.
Clone the repository of the project you want to modify, for example, hippo-repository:
$ git clone https://code.onehippo.org/cms-community/hippo-repository.git
Create a new local fork development branch based on the release you want to modify, for example. 5.3.0:
$ cd hippo-repository $ git checkout -b forked-5.2.0 hippo-repository-5.2.0
Update the POM versions of your forked project:
$ mvn release:update-versions -DautoVersionSubmodules -DdevelopmentVersion=5.2.0-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 the gettingstarted project, override the version property for the project you modified in the gettingstarted project's root pom.xml:
<hippo.repository.version>5.2.0-forked-SNAPSHOT</hippo.repository.version>
Then rebuild the gettingstarted 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.