Skip to content

Commit 9c70e4b

Browse files
migrate from ossrh to maven central publishing (#305)
1 parent 0bed3f9 commit 9c70e4b

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
java-version: 8
1616
distribution: 'adopt'
17-
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
17+
server-id: central # Value of the distributionManagement/repository/id field of the pom.xml
1818
server-username: MAVEN_USERNAME # env variable for username in deploy
1919
server-password: MAVEN_PASSWORD # env variable for token in deploy
2020
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import

pom.xml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@
9292

9393
<distributionManagement>
9494
<snapshotRepository>
95-
<id>ossrh</id>
96-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
95+
<id>central</id>
96+
<url>https://central.sonatype.com/repository/maven-snapshots</url>
9797
</snapshotRepository>
9898
<repository>
99-
<id>ossrh</id>
100-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
99+
<id>central</id>
100+
<url>https://central.sonatype.com/</url>
101101
</repository>
102102
</distributionManagement>
103103

@@ -184,15 +184,13 @@
184184
<version>3.0.0</version>
185185
</plugin>
186186
<plugin>
187-
<groupId>org.sonatype.plugins</groupId>
188-
<artifactId>nexus-staging-maven-plugin</artifactId>
189-
<version>1.6.13</version>
187+
<groupId>org.sonatype.central</groupId>
188+
<artifactId>central-publishing-maven-plugin</artifactId>
189+
<version>0.9.0</version>
190190
<extensions>true</extensions>
191191
<configuration>
192-
<serverId>ossrh</serverId>
193-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
194-
<!-- set to 'false' if you want to manually inspect the repository before releasing -->
195-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
192+
<publishingServerId>central</publishingServerId>
193+
<autoPublish>true</autoPublish>
196194
</configuration>
197195
</plugin>
198196
<plugin>

0 commit comments

Comments
 (0)