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.

Building Source Code

Building Source Code

Checkout Source Code

Warning: Windows File Path Limitation

Do not save your source project 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 to contain the Elastic Path source.
  2. Checkout the Elastic Path Commerce code from the source control repository to your local source folder.

Configure Maven settings.xml

You need to configure your local copy of the settings.xml file in the extensions module 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 an .m2 directory in your user home folder. In Windows, the command is:
    mkdir C:\Users\<YourWindowsUser>\.m2
  2. Copy settings.xml from the /extensions/maven source directory 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 database 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 the Starting Construction Guide and you will not be able to build and deploy the Elastic Path Web Applications.

Build All Projects

It is possible to build all projects with one Maven command.

  1. With the command line, navigate to the Elastic Path Commerce source directory.
  2. Enter the following Maven command.
    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 Individual Modules

If needed, each module in Elastic Path can be built seperately.

When building modules seperately, the order in which modules are built matters. Some modules rely on others being built in order to build correctly.

Elastic Path Commerce modules must be built in the following order:

  1. commerce-data
  2. commerce-engine
  3. commerce-manager
  4. cortex-resources
  5. extensions

This means that if you want to build the commerce-manager module, you must first build the commerce-data and commerce-engine modules individually using the steps described below.

To build a module individually:

  1. Ensure that all modules the module you wish to build have been built.
  2. In the command line, navigate to the Elastic Path Commerce source directory.
  3. Navigate to the project you want to build.
  4. Enter the following Maven command.
    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.