Skip to content

Commit a1c0482

Browse files
committed
CI: restore maven central deployment
Maven Central switched their deployment infrastructure from OSSRH to a maven central infrastrucutre, which requires using a different maven plugin for deployment. Signed-off-by: Alexander Krimm <[email protected]>
1 parent 742f003 commit a1c0482

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ jobs:
105105
with:
106106
java-version: ${{ env.JAVA_REFERENCE_VERSION }}
107107
distribution: 'temurin'
108-
server-id: ossrh
108+
server-id: central
109109
server-username: SONATYPE_USER
110110
server-password: SONATYPE_PASS
111111
# gpg-private-key: ${{ secrets.GPG_KEY }} # gpg key was already added in the first java-setup phase, will fail the cleanup if added again
112112
gpg-passphrase: GPG_PASS
113113
- name: Deploy to Maven Central
114-
run: mvn -DskipTests --no-transfer-progress --batch-mode -Drevision=${REVISION} -Dsha1=${SHA1} -Dchangelist=${CHANGELIST} -Drelease=ossrh deploy
114+
run: mvn -DskipTests --no-transfer-progress --batch-mode -Drevision=${REVISION} -Dsha1=${SHA1} -Dchangelist=${CHANGELIST} -Drelease=central deploy
115115
env:
116116
GPG_PASS: ${{ secrets.GPG_PASSPHRASE }}
117117
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}

pom.xml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,11 @@
339339
</distributionManagement>
340340
</profile>
341341
<profile>
342-
<id>releaseOSSRH</id>
342+
<id>releaseCentral</id>
343343
<activation>
344344
<property>
345345
<name>release</name>
346-
<value>ossrh</value>
346+
<value>central</value>
347347
</property>
348348
</activation>
349349
<build>
@@ -370,24 +370,17 @@
370370
</configuration>
371371
</plugin>
372372
<plugin>
373-
<groupId>org.sonatype.plugins</groupId>
374-
<artifactId>nexus-staging-maven-plugin</artifactId>
375-
<version>1.7.0</version>
373+
<groupId>org.sonatype.central</groupId>
374+
<artifactId>central-publishing-maven-plugin</artifactId>
375+
<version>0.9.0</version>
376376
<extensions>true</extensions>
377377
<configuration>
378-
<serverId>ossrh</serverId>
379-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
380-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
378+
<publishingServerId>central</publishingServerId>
379+
<autoPublish>true</autoPublish>
381380
</configuration>
382381
</plugin>
383382
</plugins>
384383
</build>
385-
<distributionManagement>
386-
<snapshotRepository>
387-
<id>ossrh</id>
388-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
389-
</snapshotRepository>
390-
</distributionManagement>
391384
</profile>
392385
</profiles>
393386
</project>

0 commit comments

Comments
 (0)