Commit 0f690167 authored by Suzanne Selhorn's avatar Suzanne Selhorn

Merge branch 'generalize-maven-repository' into 'master'

Generalize the site URL

See merge request gitlab-org/gitlab!46451
parents a9cdcc34 1089cffb
...@@ -707,23 +707,23 @@ You can create a new package each time the `master` branch is updated. ...@@ -707,23 +707,23 @@ You can create a new package each time the `master` branch is updated.
1. Make sure your `pom.xml` file includes the following. 1. Make sure your `pom.xml` file includes the following.
You can either let Maven use the CI environment variables, as shown in this example, You can either let Maven use the CI environment variables, as shown in this example,
or you can hard code your project's ID. or you can hard code your server's hostname and project's ID.
```xml ```xml
<repositories> <repositories>
<repository> <repository>
<id>gitlab-maven</id> <id>gitlab-maven</id>
<url>https://gitlab.example.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url> <url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</repository> </repository>
</repositories> </repositories>
<distributionManagement> <distributionManagement>
<repository> <repository>
<id>gitlab-maven</id> <id>gitlab-maven</id>
<url>https://gitlab.example.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url> <url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</repository> </repository>
<snapshotRepository> <snapshotRepository>
<id>gitlab-maven</id> <id>gitlab-maven</id>
<url>https://gitlab.example.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url> <url>${env.CI_SERVER_URL}/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
</snapshotRepository> </snapshotRepository>
</distributionManagement> </distributionManagement>
``` ```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment