Skip to content

Commit 2317bc4

Browse files
authored
Switch to publish to Maven Central (#1278)
1 parent 2152ab8 commit 2317bc4

File tree

3 files changed

+8
-19
lines changed

3 files changed

+8
-19
lines changed

.github/workflows/maven-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
distribution: 'temurin'
5656
java-version: '17'
5757
cache: 'maven'
58-
server-id: ossrh
58+
server-id: central
5959
server-username: ${ env.SONATYPE_USER }
6060
server-password: ${ env.SONATYPE_PASSWORD }
6161
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}

java/pom.xml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,14 @@
212212
</plugin>
213213

214214
<plugin>
215-
<groupId>org.sonatype.plugins</groupId>
216-
<artifactId>nexus-staging-maven-plugin</artifactId>
217-
<version>1.7.0</version>
215+
<groupId>org.sonatype.central</groupId>
216+
<artifactId>central-publishing-maven-plugin</artifactId>
217+
<version>0.7.0</version>
218218
<extensions>true</extensions>
219219
<configuration>
220-
<serverId>ossrh</serverId>
221-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
222-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
220+
<publishingServerId>central</publishingServerId>
221+
<autoPublish>true</autoPublish>
222+
<waitUntil>published</waitUntil>
223223
</configuration>
224224
</plugin>
225225
</plugins>
@@ -261,15 +261,4 @@
261261
<developerConnection>scm:git:[email protected]:bufbuild/protoc-gen-validate.git</developerConnection>
262262
<tag>HEAD</tag>
263263
</scm>
264-
265-
<distributionManagement>
266-
<repository>
267-
<id>ossrh</id>
268-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
269-
</repository>
270-
<snapshotRepository>
271-
<id>ossrh</id>
272-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
273-
</snapshotRepository>
274-
</distributionManagement>
275264
</project>

java/settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
33
<servers>
44
<server>
5-
<id>ossrh</id>
5+
<id>central</id>
66
<username>${env.SONATYPE_USER}</username>
77
<password>${env.SONATYPE_PASSWORD}</password>
88
</server>

0 commit comments

Comments
 (0)