From 3dfb1cafeda6e5e42d691bd86627cf1801c65160 Mon Sep 17 00:00:00 2001 From: "Cezar.Leahu" Date: Fri, 2 Apr 2021 16:15:18 +0300 Subject: [PATCH] APPS-896 Update Maven setup instructions --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 970ebe6346..9b95dc8322 100644 --- a/README.md +++ b/README.md @@ -4,15 +4,74 @@ Please refer to our [How to contribute](/CONTRIBUTING.md) guide and our [Contributor Covenant Code of Conduct](/CODE_OF_CONDUCT.md). ## Configuring the ~/.m2/settings.xml file for local development -In order to be able to pull all the necessary project dependencies, the alfresco Maven -repositories should be configured in your local `~/.m2/settings.xml` file on your workstation. +In order to be able to pull all the necessary project dependencies, the alfresco Nexus +repositories should be added in your local Maven configuration on your workstation. -The necessary `` and `` configuration is available in the -[.travis.settings.xml](.travis.settings.xml) file (_alfresco-internal_ profile), -which is used by the project 's CI pipeline. -Just copy the **alfresco-internal** profile into your own `~/m2/repository.xml`. -You will also need to define an `alfresco-internal` server, but with your own Alfresco Nexus -credentials. +Update your `~/.m2/settings.xml` file with the _repositories_, _pluginRepositories_ and, optionally, +the _servers_ defined in the following snippet: +```xml + + + + alfresco-internal + + true + + + + + alfresco-internal + + true + + + true + + Alfresco Internal Repository + https://artifacts.alfresco.com/nexus/content/groups/internal + + + + + + alfresco-internal + Alfresco Internal Repository + https://artifacts.alfresco.com/nexus/content/groups/public + + + + + + + + alfresco-internal + ${env.MAVEN_USERNAME} + ${env.MAVEN_PASSWORD} + + + +``` + +The `alfresco-internal` server definition is required by the Alfresco _internal_ repository +group, and it should use your own Alfresco Nexus credentials. If only the _public_ repository +group is used (e.g., for the Community build) this server definition can be skipped. + +Optionally, you can also re-define the Maven Central repository, to increase the dependency download +speed (look up dependencies first in Maven Central, then in Alfresco Nexus). Define the +_Central Repository_ in both the `` and `` sections before +the _alfresco-internal_ repository: +```xml + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + +``` + For additional instructions you can check the official Maven documentation: * [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)