Skip to main content
Version: 8.7.x

Configure Maven

Required

This step is required. The settings.xml file depends on your path. See Choose Your Path.

Maven reads the ~/.m2/settings.xml file. The ep-commerce source code contains two template files in extensions/maven:

  • settings.xml is for team developers. It gets all artifacts through your team's Maven repository manager.
  • individual-settings.xml is for individual developers. It gets artifacts directly from Maven Central and from repository.elasticpath.com.

Copy the Template​

Create an .m2 directory in your home directory:

mkdir -p ~/.m2

Then follow the steps for your path.

Team Developer​

  1. Copy extensions/maven/settings.xml to ~/.m2/settings.xml.
  2. In the internet-mirror mirror, replace PROJECT_REPOSITORY_GROUP_URL with the URL of your team's Maven repository manager. For information about the repository manager, see Setup Artifact Repository Manager.

Individual Developer​

  1. Copy extensions/maven/individual-settings.xml to ~/.m2/settings.xml.

  2. In the <servers> section, replace EP_REPOSITORY_USER and EP_REPOSITORY_PASSWORD with your repository.elasticpath.com credentials. Make this change for all four servers:

    <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>
    </servers>

Set the Local Properties​

Team developers and individual developers both do this step. In the ep-developer profile of ~/.m2/settings.xml, set these properties:

PropertyValue
ep.local.asset.pathThe full path to the extensions/assets/ext-assets/src/main/assets directory in your source code.
ep.smtp.hostThe host name of your SMTP server. To turn off email, set it to mail-disabled-for-tests.
warning

Set these properties before you build. If they have no value, the build or the local deployment of the Self-Managed Commerce web applications can fail.

You set the database properties in the next step.

Next Step​

Set up a Local Database.