Skip to content

Commit d32e380

Browse files
authored
Migrate publishing to Maven Central Portal (#35)
1 parent 4f00b3b commit d32e380

File tree

5 files changed

+51
-36
lines changed

5 files changed

+51
-36
lines changed

.github/workflows/core_snapshot.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
with:
2525
java-version: '8'
2626
distribution: 'temurin'
27-
server-id: ossrh
27+
server-id: central
2828
server-username: MAVEN_USERNAME
2929
server-password: MAVEN_PASSWORD
3030
- name: Cache dependencies
@@ -44,4 +44,3 @@
4444
env:
4545
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
4646
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}
47-

.github/workflows/entraid_snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
with:
2626
java-version: '8'
2727
distribution: 'temurin'
28-
server-id: ossrh
28+
server-id: central
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131
- name: Cache dependencies

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
java-version: '8'
2626
distribution: 'temurin'
27-
server-id: ossrh
27+
server-id: central
2828
server-username: MAVEN_USERNAME
2929
server-password: MAVEN_PASSWORD
3030

core/pom.xml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,20 @@
3838
</issueManagement>
3939

4040
<scm>
41-
<connection>scm:git:[email protected]:redis/redis-authx-core.git</connection>
42-
<url>scm:git:[email protected]:redis/redis-authx-core.git</url>
43-
<developerConnection>scm:git:[email protected]:redis/redis-authx-core.git</developerConnection>
44-
<tag>redis-authx-core-${project.version}</tag>
41+
<connection>scm:git:[email protected]:redis/jvm-redis-authx-entraid.git</connection>
42+
<url>scm:git:[email protected]:redis/jvm-redis-authx-entraid.git</url>
43+
<developerConnection>https://github.com/redis/jvm-redis-authx-entraid/tree/main</developerConnection>
4544
</scm>
4645

46+
<developers>
47+
<developer>
48+
<id>redis</id>
49+
<name>Redis Ltd.</name>
50+
<organization>Redis</organization>
51+
<organizationUrl>https://redis.io</organizationUrl>
52+
</developer>
53+
</developers>
54+
4755
<properties>
4856
<github.global.server>github</github.global.server>
4957
<core.module.name>redis.clients.authentication.core</core.module.name>
@@ -86,14 +94,14 @@
8694
</dependencies>
8795

8896
<distributionManagement>
89-
<snapshotRepository>
90-
<id>ossrh</id>
91-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
92-
</snapshotRepository>
9397
<repository>
94-
<id>ossrh</id>
95-
<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>
96100
</repository>
101+
<snapshotRepository>
102+
<id>central</id>
103+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
104+
</snapshotRepository>
97105
</distributionManagement>
98106

99107
<build>
@@ -182,14 +190,14 @@
182190
<version>3.1.1</version>
183191
</plugin>
184192
<plugin>
185-
<groupId>org.sonatype.plugins</groupId>
186-
<artifactId>nexus-staging-maven-plugin</artifactId>
187-
<version>1.7.0</version>
193+
<groupId>org.sonatype.central</groupId>
194+
<artifactId>central-publishing-maven-plugin</artifactId>
195+
<version>0.8.0</version>
188196
<extensions>true</extensions>
189197
<configuration>
190-
<serverId>ossrh</serverId>
191-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
192-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
198+
<publishingServerId>central</publishingServerId>
199+
<autoPublish>true</autoPublish>
200+
<waitUntil>published</waitUntil>
193201
</configuration>
194202
</plugin>
195203
<plugin>

entraid/pom.xml

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,20 @@
3838
</issueManagement>
3939

4040
<scm>
41-
<connection>scm:git:[email protected]:redis/redis-authx-entraid.git</connection>
42-
<url>scm:git:[email protected]:redis/redis-authx-entraid.git</url>
43-
<developerConnection>scm:git:[email protected]:redis/redis-authx-entraid.git</developerConnection>
44-
<tag>redis-authx-entraid-${project.version}</tag>
41+
<connection>scm:git:[email protected]:redis/jvm-redis-authx-entraid.git</connection>
42+
<url>scm:git:[email protected]:redis/jvm-redis-authx-entraid.git</url>
43+
<developerConnection>https://github.com/redis/jvm-redis-authx-entraid/tree/main</developerConnection>
4544
</scm>
4645

46+
<developers>
47+
<developer>
48+
<id>redis</id>
49+
<name>Redis Ltd.</name>
50+
<organization>Redis</organization>
51+
<organizationUrl>https://redis.io</organizationUrl>
52+
</developer>
53+
</developers>
54+
4755
<properties>
4856
<github.global.server>github</github.global.server>
4957
<entraid.module.name>redis.clients.authentication.entraid</entraid.module.name>
@@ -99,14 +107,14 @@
99107
</dependencies>
100108

101109
<distributionManagement>
102-
<snapshotRepository>
103-
<id>ossrh</id>
104-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
105-
</snapshotRepository>
106110
<repository>
107-
<id>ossrh</id>
108-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
111+
<id>central</id>
112+
<url>https://central.sonatype.com/api/v1/publisher/deployments/upload/</url>
109113
</repository>
114+
<snapshotRepository>
115+
<id>central</id>
116+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
117+
</snapshotRepository>
110118
</distributionManagement>
111119

112120
<build>
@@ -195,14 +203,14 @@
195203
<version>3.1.1</version>
196204
</plugin>
197205
<plugin>
198-
<groupId>org.sonatype.plugins</groupId>
199-
<artifactId>nexus-staging-maven-plugin</artifactId>
200-
<version>1.7.0</version>
206+
<groupId>org.sonatype.central</groupId>
207+
<artifactId>central-publishing-maven-plugin</artifactId>
208+
<version>0.8.0</version>
201209
<extensions>true</extensions>
202210
<configuration>
203-
<serverId>ossrh</serverId>
204-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
205-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
211+
<publishingServerId>central</publishingServerId>
212+
<autoPublish>true</autoPublish>
213+
<waitUntil>published</waitUntil>
206214
</configuration>
207215
</plugin>
208216
<plugin>

0 commit comments

Comments
 (0)