Commit 1d7d32b1 authored by Russell Dickenson's avatar Russell Dickenson

Merge branch 'selhorn-maven-vale' into 'master'

Docs: Fixed Vale issues

Closes #234932

See merge request gitlab-org/gitlab!40914
parents c28b1355 114f8e87
...@@ -20,7 +20,7 @@ NOTE: **Note:** ...@@ -20,7 +20,7 @@ NOTE: **Note:**
This option is available only if your GitLab administrator has This option is available only if your GitLab administrator has
[enabled support for the Maven repository](../../../administration/packages/index.md). [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 all new projects by default. To enable it for existing projects, or if you want
to disable it: to disable it:
...@@ -34,7 +34,7 @@ repository. ...@@ -34,7 +34,7 @@ repository.
## Getting Started with Maven ## 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 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 using Maven and understand how to build your own packages, move onto the
[next section](#adding-the-gitlab-package-registry-as-a-maven-remote). [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 ...@@ -107,7 +107,7 @@ You should see a new directory where you ran this command matching your
## Getting started with Gradle ## 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 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 using Gradle and understand how to build your own packages, move onto the
[next section](#adding-the-gitlab-package-registry-as-a-maven-remote). [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. ...@@ -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 Simply execute `gradlew` (on Linux) or `gradlew.bat` (on Windows) in the project
directory instead. directory instead.
You should see something imilar to the below printed in the output: You should see something similar to the below printed in the output:
```plaintext ```plaintext
------------------------------------------------------------ ------------------------------------------------------------
...@@ -191,7 +191,7 @@ Select build script DSL: ...@@ -191,7 +191,7 @@ Select build script DSL:
Enter selection (default: Groovy) [1..2] 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 ```plaintext
Select test framework: Select test framework:
...@@ -213,7 +213,7 @@ Enter a project name or hit enter to use the directory name as project name. ...@@ -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 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, 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), for [personal access tokens](#authenticating-with-a-personal-access-token),
[CI job tokens](#authenticating-with-a-ci-job-token), and [CI job tokens](#authenticating-with-a-ci-job-token), and
[deploy tokens](../../project/deploy_tokens/index.md) only. Regular username/password [deploy tokens](../../project/deploy_tokens/index.md) only. Regular username/password
...@@ -388,7 +388,7 @@ repositories { ...@@ -388,7 +388,7 @@ repositories {
To download and upload packages from GitLab, you need a `repository` and To download and upload packages from GitLab, you need a `repository` and
`distributionManagement` section in your `pom.xml` file. If you're following the `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. `my-project/pom.xml` file.
Depending on your workflow and the amount of Maven packages you have, there are 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. ...@@ -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 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 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 all your Maven packages stored within one GitLab group. Only packages you have access to
will be available for download. are available for download.
The group level endpoint works with any package names, which means the you 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). 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 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` 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 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 ...@@ -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 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 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 be available all maven packages stored in GitLab and the packages you have access to are available
for download. for download.
Note that **only packages that have the same path as the project** are exposed via Note that **only packages that have the same path as the project** are exposed via
...@@ -662,7 +662,7 @@ artifacts or even delete them. ...@@ -662,7 +662,7 @@ artifacts or even delete them.
Installing a package from the GitLab Package Registry requires that you set up 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) 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` ### Install using Maven with `mvn install`
...@@ -732,7 +732,7 @@ you can configure GitLab CI/CD to build new packages automatically. ...@@ -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 The example below shows how to create a new package each time the `master` branch
is updated: 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. Add the server section with the same ID you defined in your `pom.xml` file.
For example, in our case it's `gitlab-maven`: For example, in our case it's `gitlab-maven`:
...@@ -792,9 +792,9 @@ is updated: ...@@ -792,9 +792,9 @@ is updated:
1. Push those files to your repository. 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 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). [environment variables](../../../ci/variables/README.md#predefined-environment-variables).
### Creating Maven packages with GitLab CI/CD using Gradle ### Creating Maven packages with GitLab CI/CD using Gradle
......
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