Skip to content

Commit

Permalink
Provide example of multiple repositories
Browse files Browse the repository at this point in the history
GitHub Maven Packages may require multiple repositories where many
different packages are used or consumed. This is a limitation of the
group/organization package resolution.
  • Loading branch information
timothystone committed Nov 28, 2020
1 parent f735288 commit d463997
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you want to interact with multiple repositories, you can add each repository
If your instance has subdomain isolation enabled:
{% endif %}

<pre>
```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
Expand Down Expand Up @@ -66,22 +66,18 @@ If your instance has subdomain isolation enabled:
<enabled>true</enabled>
</snapshots>
</repository>
<!-- EACH package should be separately noted due to a limitation on group/organization
level package resolution. This may lead to numerous `repository` definitions that
are different in `REPOSITORY` only.
-->
<!-- <repository>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}maven.HOSTNAME{% endif %}/OWNER/REPOSITORY</url>
<url>https://{% if currentVersion == "free-pro-team@latest" %}maven.pkg.github.com{% else %}maven.HOSTNAME{% endif %}/OWNER/REPOSITORY-2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->

</repositories>
</profile>
</profiles>
Expand All @@ -94,12 +90,12 @@ If your instance has subdomain isolation enabled:
</server>
</servers>
</settings>
</pre>
```

{% if enterpriseServerVersions contains currentVersion %}
If your instance has subdomain isolation disabled:

<pre>
```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
Expand Down Expand Up @@ -128,22 +124,17 @@ If your instance has subdomain isolation disabled:
<enabled>true</enabled>
</snapshots>
</repository>
<!-- EACH package should be separately noted due to a limitation on group/organization
level package resolution. This may lead to numerous `repository` definitions that
are different in `REPOSITORY` only.
-->
<!-- <repository>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
<url>https://maven.pkg.github.com/OWNER/REPOSITORY-2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->
</repositories>
</profile>
</profiles>
Expand All @@ -156,7 +147,7 @@ If your instance has subdomain isolation disabled:
</server>
</servers>
</settings>

This comment was marked as spam.

Copy link
@Liverpoolj
</pre>
```
{% endif %}

#### Authenticating with the `GITHUB_TOKEN`
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
{% data variables.product.prodname_registry %} supports `SNAPSHOT` versions of Apache Maven. To use the GitHub Package repository for downloading `SNAPSHOT` artifacts, enable SNAPSHOTS in the POM of the consuming project or your *~/.m2/settings.xml* file.

EACH package should be in a separate repository due to a limitation on group/organization level package resolution. This may lead to numerous `repository` definitions that are different in `REPOSITORY` only.

0 comments on commit d463997

Please sign in to comment.