Skip to content

Commit 0955dbe

Browse files
authored
Merge pull request #36164 from github/repo-sync
Repo sync
2 parents 00b32a0 + 73f963e commit 0955dbe

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

content/actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ topics:
1717
- Java
1818
- Maven
1919
---
20-
20+
2121
{% data reusables.actions.enterprise-github-hosted-runners %}
2222

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

4242
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.
4343

44+
{% data reusables.package_registry.maven-package-naming-convention %}
45+
4446
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.
4547

4648
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).

content/packages/working-with-a-github-packages-registry/working-with-the-apache-maven-registry.md

+2
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ If your instance has subdomain isolation disabled:
136136

137137
{% 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`.
138138

139+
{% data reusables.package_registry.maven-package-naming-convention %}
140+
139141
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.
140142

141143
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).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
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 commit comments

Comments
 (0)