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.

Build the Source Code

Build the Source Code

Checkout Source Code

Warning: Windows File Path Limitation

Do not checkout your source code 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.

To checkout a local copy of the Elastic Path source code from your source control repository:
  1. Create a folder with a short name to house your source code. For example, C:\source
  2. Checkout the following Elastic Path projects from the source control repository to your local source folder:
    • commerce-engine

    • extensions

    • cmclient
    • ep-aem-commerce

Configure Maven Settings.xml

You need to configure your local copy of the settings.xml, which is available in the extensions project before you build the source code.

To create a local Maven repository, which will contain the Elastic Path build artifacts you build:
  1. With the command line, create a .m2 directory in your user home folder. In Windows, the command is:
    mkdir C:\Users\<YourWindowsUser>\.m2
  2. Copy settings.xml from <Source Code Root>\extensions\maven to your .m2 directory.
  3. Modify settings.xml values to match your local developer environment. Pay attention to:
    Property Profile Definition
    epdb.reset_user mysql-dev-db The DB account with administrative permissions that can drop and create databases and users in your local database.
    epdb.reset_password mysql-dev-db The password for epdb.reset_user.
    ep.local.asset.path - The path to your local /extensions/assets/ext-assets/src/main/assets source directory
    ep.smtp.host - Your SMTP Server
    Tip:

    If these property values do not exist in the settings.xml, then your source code has likely not been prepared according to Starting Construction - Prepare Source Code and you will not be able to build and deploy the Elastic Path Web Applications.

Build Commerce Engine

  1. With the command line, navigate to the commerce-engine directory in your source directory.
  2. Enter the following Maven command to build Commerce Engine:
    mvn clean install -DskipAllTests
    
    The -DskipAllTests stops Maven from executing any unit and integration tests, but does not stop them from building the tests. For more information on assets, see Managing Assets. For more details on the Maven arguments, see Elastic Path Maven Commands.

Build Extension Projects

  1. With the command line, navigate to the extensions directory in your source directory.
  2. Enter the following Maven command to build Commerce Engine:
    mvn clean install

Build Commerce Manager Client

After building the Commerce Engine, you can build the Commerce Manager Client, a desktop application that lets you manage your Elastic Path stores.

  1. With the command line, navigate to <Source Code Root>\cmclient, and enter the following command to build the Commerce Manager Client:
    mvn install -DskipAllTests
    
    The Commerce Manager client's executable file will be located in the cmclient\product\target\<your architecture>\commercemanager directory, where <your architecture> is one of the platform profiles listed below.

Building the Commerce Manager Client for Other Platforms

By default, the Commerce Manager Client will build for your local platform. If you would like to build the Commerce Manager Client for a specific platform, follow the instructions below:

  1. With the command line, navigate to <Source Code Root>\cmclient
  2. Run one of the following commands: To build the Commerce Manager Client for a specific platform:
    mvn package -P<TargetPlatform>,!<CurrentPlatform>
    To build the Commerce Manager Client for all supported platforms:
    mvn package -Pmulti-platform
    You may build the Commerce Manager Client for the following platforms:
    Operating System Platform Profile
    Windows 32-bit win32-win32-i386
    Windows 64-bit win32-win32-amd64
    Mac 32-bit mac-cocoa-i386
    Linux 64-bit linux-gtk-amd64
    Linux 32-bit linux-gtk-i386
    Examples: To build the Client for 32-bit and 64-bit Windows and your platform is Mac 32-bit:
    mvn package -Pwin32-win32-i386,win32-win32-amd64,\!mac-cocoa-i386