Set Up Maven Repository
Set Up Maven Repository
Dependent on | By | Documentation |
---|---|---|
Maven repository manager server provisioning | IT Operations | Prepare Infrastructure |
Overview
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.
Not all Maven artifacts that Elastic Path products depend on are provided in the release package. You will have to get those artifacts from Elastic Path's Maven Repository.
If you plan to use the Nexus Repository Manager, a shell script is available to install and configure it. See Nexus Setup for detailed instructions.
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.
Repository | Provider | Policy | URL | Credentials Required |
---|---|---|---|---|
Maven Central | Maven2 | Release | http://central.maven.org/maven2/ | |
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 | |
Sonatype | Maven2 | Release | https://repository.sonatype.org/content/groups/forge | |
Wakaleo (for schemaspy) | Maven2 | Release | http://www.wakaleo.com/maven/repos | |
Springsource Bundles | Maven2 | Release | http://repository.springsource.com/maven/bundles/external | |
Springsource Zodiac Milestone Bundles | Maven2 | Release | http://zodiac.springsource.com/maven/bundles/milestone | |
Springsource Milestone | Maven2 | Release | https://maven.springframework.org/milestone/ | |
Adobe Public | Maven2 | Release | http://repo.adobe.com/nexus/content/groups/public | |
Adobe AEM | Maven2 | Release | http://localhost:4502/maven/repository/ (see setup instructions below) |
A username and password are required to access the Elastic Path repositories. For more information, see Download Prerequisites.
Depending on your Elastic Path license you may not have access to all repositories
Configure Adobe AEM as a Maven repository
- AEM 's UberJar is broken
- Your project's dependencies are unavailable in your local Nexus
- Install an AEM 6.1 author instance on your Maven repository server.
- Download and install the cq5-archiva-servlet-1.6.zip as documented in step 1 at https://helpx.adobe.com/experience-manager/kb/HowToUseCQ5AsMavenRepository.html.
- Configure a proxy for http://localhost:4502/maven/repository/. Remember to set the credentials to match your AEM instance.
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.
Manual uploads
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 Dependency |
---|---|---|
MySQL JDBC driver |
Download platform independent version 5.1.37 from http://downloads.mysql.com/archives/c-j/ |
<groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.37</version> |