Prepare Source Code
Prepare Source Code
Overview
This page describes how to prepare Elastic Path source code for use by your project. The diagram below shows the steps.
ep-aem-commerce and geometrixx-demo projects are only available with EP-Commerce-for-AMC-1.5.zip package
Setup local build environment
Unzip source release packages
EP source is delivered in multiple ZIP files. You should obtain one or more of the following release packages depending on your license and the environment you wish to create:
Release Package | Contents |
---|---|
EP-Commerce-6.17.0.zip | Core Commerce, Cortex |
EP-Commerce-for-AMC-1.5.zip | EP Commerce for Adobe Marketing Cloud |
- Unzip the contents of the release packages into your project source folder. Warning: Windows File Path Limitation
Do not save your source projects to a directory that is greater than 20 characters in length. Windows file paths are limited to 260 characters. The longest file path in the source code is greater than 230 characters so be careful where you deploy your source files.
Configure the project settings.xml
The extensions project has a maven/individual-settings.xml you will use.
- Change EP_REPOSITORY_USER and EP_REPOSITORY_PASSWORD
to the credentials used for connecting to our public Nexus and change
ADOBE_AEM_AUTHOR_USER and ADOBE_AEM_AUTHOR_PASSWORD to
your local AEM author
credentials
<servers> <server> <id>ep-public</id> <username>EP_REPOSITORY_USER</username> <password>EP_REPOSITORY_PASSWORD</password> </server> <server> <id>ep-cortex</id> <username>EP_REPOSITORY_USER</username> <password>EP_REPOSITORY_PASSWORD</password> </server> <server> <id>ep-commerce-engine</id> <username>EP_REPOSITORY_USER</username> <password>EP_REPOSITORY_PASSWORD</password> </server> <server> <id>ep-accelerators</id> <username>EP_REPOSITORY_USER</username> <password>EP_REPOSITORY_PASSWORD</password> </server> <server> <id>adobe-aem</id> <username>ADOBE_AEM_AUTHOR_USER</username> <password>ADOBE_AEM_AUTHOR_PASSWORD</password> </server> </servers>
- Make any changes required for your project environment.
- Commit the changes to source control.
- Rename individual-settings.xml to settings.xml copy it to your ${user.home}/.m2 directory.
Remove unlicensed modules
If you do not have a license for EP Commerce for AMC, you need to remove related dependencies from the extensions project source. Otherwise the build will fail when it attempts to get artifacts from Elastic Path Maven repository groups to which you don't have access.
The devops project: contains modules to remove EP Commerce for AMC references from the extensions project source:
Reversion Projects for Development
EP release packages contain projects with RELEASE versions. Prior to starting development, the projects must be reversioned to SNAPSHOT versions using scripts provided in the devops project.
On Windows, use either Git Bash, MinGW, or Cygwin to run the script.
To reversion projects for development:
- Make sure that:
- All projects have a common parent folder.
- Project folders have the same names as ones provided in source release packages.
- The development branch is checked out for each source repository.
- Run the following script to reversion the cmclient,
commerce-engine, devops and
extensions projects.
cd <projects-parent-folder> ./devops/scripts/set-ep-versions.sh 617.0.0-SNAPSHOT 0-SNAPSHOT commerce-engine extensions cmclient devops
- (Optional) Run the following script to reversion the cortex-ep-integration project. If you don't reversion this project, then the cortex-ep-integration release binaries will be retrived from the Elastic Path Nexus repository. You will need to reversion the project to a SNAPSHOT version if you wish to make changes to it.
cd <projects-parent-folder> ./devops/scripts/set-cortex-ep-integration-version.sh 617.0.0-SNAPSHOT 0-SNAPSHOT cortex-ep-integration extensions
- (Optional) Run the following script to reversion the EP Commerce for AMC projects.
cd <projects-parent-folder> ./devops/scripts/set-ep-for-aem-versions.sh 617.0.0-SNAPSHOT 0-SNAPSHOT ep-aem-commerce geometrixx-demo
Set up local Developer environment
Follow the instructions at CE & Cortex - Setting up your Developer Environment to configure, build and run Elastic Path in a command line environment.