Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
114f8e87
Commit
114f8e87
authored
Sep 01, 2020
by
Suzanne Selhorn
Committed by
Russell Dickenson
Sep 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Fixed Vale issues
Related to:
https://gitlab.com/gitlab-org/gitlab/-/issues/234932
parent
525ee153
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
doc/user/packages/maven_repository/index.md
doc/user/packages/maven_repository/index.md
+15
-15
No files found.
doc/user/packages/maven_repository/index.md
View file @
114f8e87
...
...
@@ -20,7 +20,7 @@ NOTE: **Note:**
This option is available only if your GitLab administrator has
[
enabled support for the Maven repository
](
../../../administration/packages/index.md
)
.
After the Packages feature is enabled, the Maven Repository
will be
available for
After the Packages feature is enabled, the Maven Repository
is
available for
all new projects by default. To enable it for existing projects, or if you want
to disable it:
...
...
@@ -34,7 +34,7 @@ repository.
## Getting Started with Maven
This section
will cover
installing Maven and building a package. This is a
This section
covers
installing Maven and building a package. This is a
quickstart to help if you're new to building Maven packages. If you're already
using Maven and understand how to build your own packages, move onto the
[
next section
](
#adding-the-gitlab-package-registry-as-a-maven-remote
)
.
...
...
@@ -107,7 +107,7 @@ You should see a new directory where you ran this command matching your
## Getting started with Gradle
This section
will cover
installing Gradle and initializing a Java project. This is a
This section
covers
installing Gradle and initializing a Java project. This is a
quickstart to help if you're new to Gradle. If you're already
using Gradle and understand how to build your own packages, move onto the
[
next section
](
#adding-the-gitlab-package-registry-as-a-maven-remote
)
.
...
...
@@ -128,7 +128,7 @@ If you want to use an existing Gradle project, installation is not necessary.
Simply execute
`gradlew`
(on Linux) or
`gradlew.bat`
(on Windows) in the project
directory instead.
You should see something imilar to the below printed in the output:
You should see something
s
imilar to the below printed in the output:
```plaintext
------------------------------------------------------------
...
...
@@ -191,7 +191,7 @@ Select build script DSL:
Enter selection (default: Groovy) [1..2]
```
Choose `1` to create a new Java Library project which
will be
described in Groovy DSL. The output should be:
Choose `1` to create a new Java Library project which
is
described in Groovy DSL. The output should be:
```
plaintext
Select test framework:
...
...
@@ -213,7 +213,7 @@ Enter a project name or hit enter to use the directory name as project name.
The next step is to add the GitLab Package Registry as a Maven remote. If a
project is private or you want to upload Maven artifacts to GitLab,
credentials
will need to
be provided for authorization too. Support is available
credentials
must
be provided for authorization too. Support is available
for [personal access tokens](#authenticating-with-a-personal-access-token),
[CI job tokens](#authenticating-with-a-ci-job-token), and
[deploy tokens](../../project/deploy_tokens/index.md) only. Regular username/password
...
...
@@ -388,7 +388,7 @@ repositories {
To download and upload packages from GitLab, you need a `repository` and
`distributionManagement` section in your `pom.xml` file. If you're following the
steps from above, then you
'll need to
add the following information to your
steps from above, then you
must
add the following information to your
`my-project/pom.xml` file.
Depending on your workflow and the amount of Maven packages you have, there are
...
...
@@ -462,13 +462,13 @@ project's ID can be used for uploading.
If you rely on many packages, it might be inefficient to include the `repository` section
with a unique URL for each package. Instead, you can use the group level endpoint for
all your Maven packages stored within one GitLab group. Only packages you have access to
will b
e available for download.
ar
e available for download.
The group level endpoint works with any package names, which means the you
have the flexibility of naming compared to [instance level endpoint](#instance-level-maven-endpoint).
However, GitLab
will
not guarantee the uniqueness of the package names within
However, GitLab
does
not guarantee the uniqueness of the package names within
the group. You can have two projects with the same package name and package
version. As a result, GitLab
will serve
whichever one is more recent.
version. As a result, GitLab
serves
whichever one is more recent.
The example below shows how the relevant `repository` section of your `pom.xml`
would look like. You still need a project specific URL for uploading a package in
...
...
@@ -524,7 +524,7 @@ For retrieving artifacts, you can use either the
If you rely on many packages, it might be inefficient to include the `repository` section
with a unique URL for each package. Instead, you can use the instance level endpoint for
all maven packages stored in GitLab and the packages you have access to
will b
e available
all maven packages stored in GitLab and the packages you have access to
ar
e available
for download.
Note that **only packages that have the same path as the project** are exposed via
...
...
@@ -662,7 +662,7 @@ artifacts or even delete them.
Installing a package from the GitLab Package Registry requires that you set up
the [remote and authentication](#adding-the-gitlab-package-registry-as-a-maven-remote)
as above. Once this is completed, there are two ways
for installaing
a package.
as above. Once this is completed, there are two ways
to install
a package.
### Install using Maven with `mvn install`
...
...
@@ -732,7 +732,7 @@ you can configure GitLab CI/CD to build new packages automatically.
The example below shows how to create a new package each time the `master` branch
is updated:
1. Create a `ci_settings.xml` file that
will serve
as Maven's `settings.xml` file.
1. Create a `ci_settings.xml` file that
serves
as Maven's `settings.xml` file.
Add the server section with the same ID you defined in your `pom.xml` file.
For example, in our case it's `gitlab-maven`:
...
...
@@ -792,9 +792,9 @@ is updated:
1. Push those files to your repository.
The next time the `deploy` job runs, it
will copy
`ci_settings.xml` to the
The next time the `deploy` job runs, it
copies
`ci_settings.xml` to the
user's home location (in this case the user is `root` since it runs in a
Docker container), and Maven
will utilize
the configured CI
Docker container), and Maven
uses
the configured CI
[environment variables](../../../ci/variables/README.md#predefined-environment-variables).
### Creating Maven packages with GitLab CI/CD using Gradle
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment