Skip to content

Commit d5eb193

Browse files
authored
Migrate publishing to Maven Central Portal (#3348)
* Migrate publishing to Maven Central Portal * Fix SNAPSHOT version format As required by https://central.sonatype.org/publish/publish-portal-snapshots/
1 parent 2dd7f9d commit d5eb193

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

.github/workflows/snapshot.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
java-version: '8'
2323
distribution: 'temurin'
2424
cache: 'maven'
25-
server-id: ossrh
25+
server-id: central
2626
server-username: MAVEN_USERNAME
2727
server-password: MAVEN_PASSWORD
2828
- name: mvn offline
@@ -33,4 +33,4 @@ jobs:
3333
mvn --no-transfer-progress deploy
3434
env:
3535
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
36-
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}
36+
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}

.github/workflows/version-and-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
java-version: '8'
2121
distribution: 'temurin'
2222
cache: 'maven'
23-
server-id: ossrh
23+
server-id: central
2424
server-username: MAVEN_USERNAME
2525
server-password: MAVEN_PASSWORD
2626

pom.xml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>io.lettuce</groupId>
55
<artifactId>lettuce-core</artifactId>
6-
<version>7.0.0.BUILD-SNAPSHOT</version>
6+
<version>7.0.0-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>Lettuce</name>
@@ -94,16 +94,14 @@
9494
</scm>
9595

9696
<distributionManagement>
97-
<snapshotRepository>
98-
<id>ossrh</id>
99-
<name>Sonatype Nexus Snapshots</name>
100-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
101-
</snapshotRepository>
10297
<repository>
103-
<id>ossrh</id>
104-
<name>Nexus Release Repository</name>
105-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
98+
<id>central</id>
99+
<url>https://central.sonatype.com/api/v1/publisher/deployments/upload/</url>
106100
</repository>
101+
<snapshotRepository>
102+
<id>central</id>
103+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
104+
</snapshotRepository>
107105
</distributionManagement>
108106

109107
<dependencyManagement>
@@ -973,14 +971,14 @@
973971
</plugin>
974972

975973
<plugin>
976-
<groupId>org.sonatype.plugins</groupId>
977-
<artifactId>nexus-staging-maven-plugin</artifactId>
978-
<version>1.6.13</version>
974+
<groupId>org.sonatype.central</groupId>
975+
<artifactId>central-publishing-maven-plugin</artifactId>
976+
<version>0.8.0</version>
979977
<extensions>true</extensions>
980978
<configuration>
981-
<serverId>ossrh</serverId>
982-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
983-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
979+
<publishingServerId>central</publishingServerId>
980+
<autoPublish>true</autoPublish>
981+
<waitUntil>published</waitUntil>
984982
</configuration>
985983
</plugin>
986984

0 commit comments

Comments
 (0)