mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
APPS-896 Update Maven setup instructions
This commit is contained in:
75
README.md
75
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).
|
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
|
## Configuring the ~/.m2/settings.xml file for local development
|
||||||
In order to be able to pull all the necessary project dependencies, the alfresco Maven
|
In order to be able to pull all the necessary project dependencies, the alfresco Nexus
|
||||||
repositories should be configured in your local `~/.m2/settings.xml` file on your workstation.
|
repositories should be added in your local Maven configuration on your workstation.
|
||||||
|
|
||||||
The necessary `<repository/>` and `<pluginRepository/>` configuration is available in the
|
Update your `~/.m2/settings.xml` file with the _repositories_, _pluginRepositories_ and, optionally,
|
||||||
[.travis.settings.xml](.travis.settings.xml) file (_alfresco-internal_ profile),
|
the _servers_ defined in the following snippet:
|
||||||
which is used by the project 's CI pipeline.
|
```xml
|
||||||
Just copy the **alfresco-internal** profile into your own `~/m2/repository.xml`.
|
<settings>
|
||||||
You will also need to define an `alfresco-internal` server, but with your own Alfresco Nexus
|
<profiles>
|
||||||
credentials.
|
<profile>
|
||||||
|
<id>alfresco-internal</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>alfresco-internal</id>
|
||||||
|
<releases>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<name>Alfresco Internal Repository</name>
|
||||||
|
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>alfresco-internal</id>
|
||||||
|
<name>Alfresco Internal Repository</name>
|
||||||
|
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<servers>
|
||||||
|
<server>
|
||||||
|
<id>alfresco-internal</id>
|
||||||
|
<username>${env.MAVEN_USERNAME}</username>
|
||||||
|
<password>${env.MAVEN_PASSWORD}</password>
|
||||||
|
</server>
|
||||||
|
</servers>
|
||||||
|
</settings>
|
||||||
|
```
|
||||||
|
|
||||||
|
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 `<repositories/>` and `<pluginRepositories/>` sections before
|
||||||
|
the _alfresco-internal_ repository:
|
||||||
|
```xml
|
||||||
|
<repository>
|
||||||
|
<id>central</id>
|
||||||
|
<name>Central Repository</name>
|
||||||
|
<url>https://repo.maven.apache.org/maven2</url>
|
||||||
|
<layout>default</layout>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
For additional instructions you can check the official Maven documentation:
|
For additional instructions you can check the official Maven documentation:
|
||||||
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
|
* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html)
|
||||||
|
Reference in New Issue
Block a user