Skip to content

Commit

Permalink
Merge pull request #36164 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot authored Feb 4, 2025
2 parents 00b32a0 + 73f963e commit 0955dbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ topics:
- Java
- Maven
---

{% data reusables.actions.enterprise-github-hosted-runners %}

## Introduction
Expand All @@ -41,6 +41,8 @@ You may also find it helpful to have a basic understanding of the following:

The `groupId` and `artifactId` fields in the _pom.xml_ file create a unique identifier for your package that registries use to link your package to a registry. For more information see [Guide to uploading artifacts to the Central Repository](https://maven.apache.org/repository/guide-central-repository-upload.html) in the Apache Maven documentation.

{% data reusables.package_registry.maven-package-naming-convention %}

The _pom.xml_ file also contains configuration for the distribution management repositories that Maven will deploy packages to. Each repository must have a name and a deployment URL. Authentication for these repositories can be configured in the _.m2/settings.xml_ file in the home directory of the user running Maven.

You can use the `setup-java` action to configure the deployment repository as well as authentication for that repository. For more information, see [`setup-java`](https://github.com/actions/setup-java).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ If your instance has subdomain isolation disabled:

{% data reusables.package_registry.default-name %} For example, {% data variables.product.prodname_dotcom %} will publish a package named `com.example:test` in a repository called `OWNER/test`.

{% data reusables.package_registry.maven-package-naming-convention %}

If you would like to publish multiple packages to the same repository, you can include the URL of the repository in the `<distributionManagement>` element of the _pom.xml_ file. {% data variables.product.prodname_dotcom %} will match the repository based on that field. Since the repository name is also part of the `distributionManagement` element, there are no additional steps to publish multiple packages to the same repository.

For more information on creating a package, see the [maven.apache.org documentation](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html).
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>[!WARNING] Your Apache Maven package must follow the naming convention, and therefore the `artifactId` field should only contain lowercase letters, digits, or hyphens. For more information, see [Naming convention of Maven coordinates](https://maven.apache.org/guides/mini/guide-naming-conventions.html) in the maven.apache.org documentation. If you use upercase letters in the artifact name, you'll get a _422 Unprocessable Entity_ response.

0 comments on commit 0955dbe

Please sign in to comment.