Set Up Maven Repository
Set Up Maven Repository
|Maven repository manager server provisioning||IT Operations||Prepare Infrastructure|
A Maven Repository Manager is an essential component for team development of Maven based projects. The Maven Project site explains why and provides a list of available Repository Managers.
Recommended Repository Structure
Repositories are collections of the artifacts you reuse to build your software. The image below shows the recommend repository structure for Elastic Path projects. As you can see in the image, the main repository group is the <project> EP Repository Group. All dependencies needed to build Elastic Path can be obtained from this group. Continuous integration builds deploy generated artifacts to either the <project> EP Snapshots or the <project> EP Releases repository depending on whether the artifacts have SNAPSHOT or release versions.
Proxy External Repositories
The following external Maven repositories are required and need to be proxied:
The repository order is important and should match the table below. Using a different repository sequence can result in build errors.
|Elastic Path Public||Maven2||Release||https://repository.elasticpath.com/nexus/content/repositories/public/|
|Elastic Path Cortex||Maven2||Release||https://repository.elasticpath.com/nexus/content/repositories/cortex/|
|Elastic Path Commerce Engine||Maven2||Release||https://repository.elasticpath.com/nexus/content/repositories/commerce-engine/|
|Elastic Path Accelerators||Maven2||Release||https://repository.elasticpath.com/nexus/content/repositories/accelerators/|
|Java Net Repository For Maven||Maven2||Release||https://maven.java.net/content/repositories/releases/|
|Public JBoss Group||Maven2||Release||http://repository.jboss.org/nexus/content/groups/public-jboss|
|Wakaleo (for schemaspy)||Maven2||Release||http://www.wakaleo.com/maven/repos|
|Springsource Zodiac Milestone Bundles||Maven2||Release||http://zodiac.springsource.com/maven/bundles/milestone|
A username and password are required to access the Elastic Path repositories. For more information, see Download Prerequisites.
Configure Local Repositories and Groups
Once all external proxies have been configured, you will need to create local repositories and groups and build the repository hierarchy.
- Create a hosted repository (e.g. <project> EP Snapshots) with a "snapshot" policy.
- Create a hosted repository (e.g. <project> EP Releases) with a "release" policy.
- Create an External Proxy Repository Group and add all external proxies to it in the order defined in the Proxy external respositories section.
- Create a <project> EP Repository Group and add the hosted repositories and the External Proxy Repository Group to it.
Some artifacts cannot be obtained from public Maven repositories because of licensing restrictions. These need to be manually uploaded to your Maven repository.
|Artifact||Source||EP Commerce Dependency|
|MySQL JDBC driver||Download platform independent version 5.1.44 from https://dev.mysql.com/downloads/connector/j/||
<groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.44</version>
A user account with maven deployment privileges needs to be created for use by the Continuous Integration server to deploy build artifacts.