Configure Maven
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.xmlis for team developers. It gets all artifacts through your team's Maven repository manager.individual-settings.xmlis for individual developers. It gets artifacts directly from Maven Central and fromrepository.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
- Copy
extensions/maven/settings.xmlto~/.m2/settings.xml. - In the
internet-mirrormirror, replacePROJECT_REPOSITORY_GROUP_URLwith the URL of your team's Maven repository manager. For information about the repository manager, see Setup Artifact Repository Manager.
Individual Developer
-
Copy
extensions/maven/individual-settings.xmlto~/.m2/settings.xml. -
In the
<servers>section, replaceEP_REPOSITORY_USERandEP_REPOSITORY_PASSWORDwith yourrepository.elasticpath.comcredentials. 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:
| Property | Value |
|---|---|
ep.local.asset.path | The full path to the extensions/assets/ext-assets/src/main/assets directory in your source code. |
ep.smtp.host | The host name of your SMTP server. To turn off email, set it to mail-disabled-for-tests. |
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.