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 if the file path is greater than 20 characters. Windows file paths are limited to 260 characters. The longest file path in the source code is greater than 230 characters.

To checkout a local copy of the Elastic Path source code from your source control repository:
  1. Create a folder to save 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

Before you build the source code, configure settings.xml file in the extensions module on your system.

To create a local Maven repository that contains the Elastic Path build artifacts
  1. To create an .m2 directory in your local folder, run the following command:
    mkdir C:\Users\<YourWindowsUser>\.m2
  2. Copy settings.xml from the /extensions/maven source directory to your .m2 directory.
  3. Modify the settings.xml values to match your local developer environment.
    Table 1. settings.xml properties
    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, the source code might not be following the guidelines at Starting Construction Guide, and you cannot build and deploy the Elastic Path Web Applications.

Build All Projects

You can build all projects with one Maven command.

  1. Open the command line and navigate to the Elastic Path Commerce source directory.
  2. Run the following Maven command:
    mvn clean install -DskipAllTests
    

    With the -DskipAllTests command, the system does not run any unit test or integration tests, however the system still builds the test. For more details on the Maven arguments, see Elastic Path Maven Commands.

Building Individual Modules

You can also build each module in Elastic Path separately, if required. However, you cannot build the individual modules unless you build the Elastic Path Commerce source directory at least once. When you build the Elastic Path Commerce modules separately, you must follow the following order:

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

For example, when you build the commerce-manager module, you must first build the commerce-data and commerce-engine modules separately.

Building individual modules

Prerequisites
  • Ensure that all modules required to build the current module is built and the ep-commerce module is built at least once.

Procedure

  1. To build a module individually, in the command line, navigate to the Elastic Path Commerce source directory.
  2. Navigate to the project that you want to build.
  3. Enter the following Maven command:
    mvn clean install -DskipAllTests
    

    With the -DskipAllTests command, the system does not run any unit test or integration tests, however the system still builds the test. For more details on the Maven arguments, see Elastic Path Maven Commands.