Skip to content

Commit

Permalink
Update GitHub Maven docs Super POM and context
Browse files Browse the repository at this point in the history
The GitHub Maven configuration overrides default behaviors of the Maven
Super POM on central releases. It additionally makes notes on
configuring user settings out of context of consuming projects of
packages.
  • Loading branch information
timothystone committed Nov 28, 2020
1 parent 42516b9 commit 9455624
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 30 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 %}

```
```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 All @@ -50,22 +50,42 @@ If your instance has subdomain isolation enabled:
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</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>
</repository>
</repositories>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</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>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<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>
<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>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github</id>
Expand All @@ -79,7 +99,7 @@ If your instance has subdomain isolation enabled:
{% if enterpriseServerVersions contains currentVersion %}
If your instance has subdomain isolation disabled:

```
```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 All @@ -92,19 +112,39 @@ If your instance has subdomain isolation disabled:
<profiles>
<profile>
<id>github</id>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://HOSTNAME/_registry/maven/OWNER/REPOSITORY</url>
</repository>
</repositories>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<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>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/OWNER/REPOSITORY</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->
</repositories>
</profile>
</profiles>

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{% data variables.product.prodname_registry %} supports `SNAPSHOT` versions of Apache Maven. To use a repository for downloading this type of artifact, you must enable SNAPSHOTS in your *~/.m2/settings.xml* file.
{% 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.

0 comments on commit 9455624

Please sign in to comment.