Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

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.

Note:

ep-aem-commerce and geometrixx-demo projects are only available with EP-Commerce-for-AMC-1.4.zip package

Starting Construction Prepare Source

Setup local build environment

You will need a working Java build environment on your local computer to prepare the source code.

  1. Setup your build environment as described in the following sections of the Core Commerce 6.15.0 Developer Guide:
    1. Java 8 (JDK 1.8 64-bit) setup
    2. Maven 3.0.5 setup
    3. Configure your System Environment Variables

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.15.2.zip Core Commerce, Cortex
EP-Commerce-for-AMC-1.4.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.

  1. 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>
  2. Make any changes required for your project environment.
  3. Commit the changes to source control.
  4. Rename individual-settings.xml to settings.xml copy it to your ${user.home}/.m2 directory.

Remove unlicensed modules

If you do not have licenses for Cortex or EP Commerce for AMC, you need to remove these modules and their 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 Cortex and EP Commerce for AMC references from the extensions project source:

Removing Cortex from project source

To remove Cortex references from the extensions project:
cd devops/scripts/remove-cortex-reference
mvn package -Dextensions.dir=<file_path_to_extensions_directory>

Removing EP Commerce for AMC from project source

To remove EP Commerce for AMC references from the extensions project:

cd devops/scripts/remove-ep-for-aem-reference
mvn package -Dextensions.dir=<file_path_to_extensions_directory>

Reversion projects for development

EP release packages contain projects with RELEASE versions. Prior to starting development, the projects must be reversioned to SNAPSHOT versions.

To reversion projects:
  1. Determine the version numbers to use for the development branch. For information on EP version number conventions and restrictions, see Construction Practices - Version Numbers.
  2. Ensure each project is checked out under the development branch.
  3. Follow the steps in Construction Practices - Update Version Numbers to reversion.

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.