Commit 7fd6e803 authored by Amy Qualls's avatar Amy Qualls

Merge branch 'selhorn-maven-repo-1' into 'master'

Docs: Updated Maven Repository topic

See merge request gitlab-org/gitlab!44529
parents 14fc6250 b5e79a09
...@@ -163,7 +163,7 @@ to authenticate with the API: ...@@ -163,7 +163,7 @@ to authenticate with the API:
- [Conan Repository](../user/packages/conan_repository/index.md) - [Conan Repository](../user/packages/conan_repository/index.md)
- [Container Registry](../user/packages/container_registry/index.md) (`$CI_REGISTRY_PASSWORD` is actually `$CI_JOB_TOKEN`, but this may change in the future) - [Container Registry](../user/packages/container_registry/index.md) (`$CI_REGISTRY_PASSWORD` is actually `$CI_JOB_TOKEN`, but this may change in the future)
- [Go Proxy](../user/packages/go_proxy/index.md) - [Go Proxy](../user/packages/go_proxy/index.md)
- [Maven Repository](../user/packages/maven_repository/index.md#authenticating-with-a-ci-job-token) - [Maven Repository](../user/packages/maven_repository/index.md#authenticate-with-a-ci-job-token)
- [NPM Repository](../user/packages/npm_registry/index.md#authenticating-with-a-ci-job-token) - [NPM Repository](../user/packages/npm_registry/index.md#authenticating-with-a-ci-job-token)
- [Nuget Repository](../user/packages/nuget_repository/index.md) - [Nuget Repository](../user/packages/nuget_repository/index.md)
- [PyPI Repository](../user/packages/pypi_repository/index.md#using-gitlab-ci-with-pypi-packages) - [PyPI Repository](../user/packages/pypi_repository/index.md#using-gitlab-ci-with-pypi-packages)
......
This diff is collapsed.
...@@ -26,8 +26,8 @@ point them at the same project on GitLab. ...@@ -26,8 +26,8 @@ point them at the same project on GitLab.
There are a few reasons you might want to publish all your packages to one project on GitLab: There are a few reasons you might want to publish all your packages to one project on GitLab:
1. You want to publish your packages on GitLab, but to a project that is different from where your code is stored. 1. You want to publish your packages on GitLab, but to a project that is different from where your code is stored.
1. You would like to group packages together in ways that make sense for your usage (all NPM packages in one project, 1. You would like to group packages together in ways that make sense for your usage (such as all NPM packages in one project,
all packages being used by a specific department in one project, all private packages in one project, etc.) all packages being used by a specific department in one project, or all private packages in one project)
1. You want to use one remote for all of your packages when installing them into other projects. 1. You want to use one remote for all of your packages when installing them into other projects.
1. You would like to migrate your packages to a single place on GitLab from a third-party package registry and do not 1. You would like to migrate your packages to a single place on GitLab from a third-party package registry and do not
want to worry about setting up separate projects for each package. want to worry about setting up separate projects for each package.
...@@ -44,7 +44,7 @@ Let's take a look at how you might create a public place to hold all of your pub ...@@ -44,7 +44,7 @@ Let's take a look at how you might create a public place to hold all of your pub
### Create a project ### Create a project
First, create a new project on GitLab. It does not have to have any code or content. Make note of the project ID First, create a new project on GitLab. It does not have to have any code or content. Make note of the project ID
displayed on the project overview page, as you will need this later. displayed on the project overview page for use later in this process.
### Create an access token ### Create an access token
...@@ -67,15 +67,15 @@ If you are using NPM, this involves creating an `.npmrc` file and adding the app ...@@ -67,15 +67,15 @@ If you are using NPM, this involves creating an `.npmrc` file and adding the app
to your project using your project ID, then adding a section to your `package.json` file with a similar URL. to your project using your project ID, then adding a section to your `package.json` file with a similar URL.
Follow Follow
the instructions in the [GitLab NPM Registry documentation](../npm_registry/index.md#authenticating-to-the-gitlab-npm-registry). Once the instructions in the [GitLab NPM Registry documentation](../npm_registry/index.md#authenticating-to-the-gitlab-npm-registry). After
you do this, you will be able to push your NPM package to your project using `npm publish`, as described in the you do this, you can push your NPM package to your project using `npm publish`, as described in the
[uploading packages](../npm_registry/index.md#uploading-packages) section of the docs. [uploading packages](../npm_registry/index.md#uploading-packages) section of the docs.
#### Maven #### Maven
If you are using Maven, this involves updating your `pom.xml` file with distribution sections, including the If you are using Maven, this involves updating your `pom.xml` file with distribution sections, including the
appropriate URL for your project, as described in the [GitLab Maven Repository documentation](../maven_repository/index.md#project-level-maven-endpoint). appropriate URL for your project, as described in the [GitLab Maven Repository documentation](../maven_repository/index.md#project-level-maven-endpoint).
Then, you need to add a `settings.xml` file and [include your access token](../maven_repository/index.md#authenticating-with-a-personal-access-token). Then, you need to add a `settings.xml` file and [include your access token](../maven_repository/index.md#authenticate-with-a-personal-access-token).
Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packages) to your project. Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packages) to your project.
#### Conan #### Conan
...@@ -83,7 +83,7 @@ Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packa ...@@ -83,7 +83,7 @@ Now you can [deploy Maven packages](../maven_repository/index.md#uploading-packa
For Conan, first you need to add GitLab as a Conan registry remote. Follow the instructions in the [GitLab Conan Repository docs](../conan_repository/index.md#add-the-package-registry-as-a-conan-remote) For Conan, first you need to add GitLab as a Conan registry remote. Follow the instructions in the [GitLab Conan Repository docs](../conan_repository/index.md#add-the-package-registry-as-a-conan-remote)
to do so. Then, create your package using the plus-separated (`+`) project path as your Conan user. For example, to do so. Then, create your package using the plus-separated (`+`) project path as your Conan user. For example,
if your project is located at `https://gitlab.com/foo/bar/my-proj`, then you can [create your Conan package](../conan_repository/index.md) if your project is located at `https://gitlab.com/foo/bar/my-proj`, then you can [create your Conan package](../conan_repository/index.md)
using `conan create . foo+bar+my-proj/channel`, where `channel` is your package channel (`stable`, `beta`, etc.). Once your package using `conan create . foo+bar+my-proj/channel`, where `channel` is your package channel (such as `stable` or `beta`). After your package
is created, you are ready to [upload your package](../conan_repository/index.md#publish-a-conan-package) depending on your final package recipe. For example: is created, you are ready to [upload your package](../conan_repository/index.md#publish-a-conan-package) depending on your final package recipe. For example:
```shell ```shell
......
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