Skip to content

Commit a6addca

Browse files
committed
migrate to Sonatype Central Portal
1 parent cce8667 commit a6addca

File tree

3 files changed

+24
-9
lines changed

3 files changed

+24
-9
lines changed

.github/settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
<servers>
88
<server>
9-
<id>ossrh</id>
10-
<username>${env.OSSRH_TOKEN_USERNAME}</username>
11-
<password>${env.OSSRH_TOKEN_PASSWORD}</password>
9+
<id>sonatype</id>
10+
<username>${env.SONATYPE_TOKEN_USERNAME}</username>
11+
<password>${env.SONATYPE_TOKEN_PASSWORD}</password>
1212
</server>
1313
</servers>
1414
</settings>

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ jobs:
5050
restore-keys: cache-deploy-
5151
- name: Run Maven
5252
env: # make secrets available as environment variables
53-
OSSRH_TOKEN_USERNAME: ${{ secrets.OSSRH_TOKEN_USERNAME }}
54-
OSSRH_TOKEN_PASSWORD: ${{ secrets.OSSRH_TOKEN_PASSWORD }}
53+
SONATYPE_TOKEN_USERNAME: ${{ secrets.SONATYPE_TOKEN_USERNAME }}
54+
SONATYPE_TOKEN_PASSWORD: ${{ secrets.SONATYPE_TOKEN_PASSWORD }}
5555
run: mvn -B -s $GITHUB_WORKSPACE/.github/settings.xml -DskipTests deploy

pom.xml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ limitations under the License.
6969
</ciManagement>
7070
<distributionManagement>
7171
<repository>
72-
<id>ossrh</id>
73-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
72+
<id>sonatype</id>
73+
<url>https://central.sonatype.com</url>
7474
</repository>
7575
<snapshotRepository>
76-
<id>ossrh</id>
77-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
76+
<id>sonatype</id>
77+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
7878
</snapshotRepository>
7979
</distributionManagement>
8080

@@ -87,6 +87,7 @@ limitations under the License.
8787
<maven.compiler.release>8</maven.compiler.release>
8888

8989
<!-- plugin versions -->
90+
<central-publish-plugin.version>0.7.0</central-publish-plugin.version>
9091
<checkstyle-plugin.version>3.3.0</checkstyle-plugin.version>
9192
<compiler-plugin.version>3.11.0</compiler-plugin.version>
9293
<dependency-plugin.version>3.6.0</dependency-plugin.version>
@@ -244,6 +245,11 @@ limitations under the License.
244245
<artifactId>maven-deploy-plugin</artifactId>
245246
<version>${deploy-plugin.version}</version>
246247
</plugin>
248+
<plugin>
249+
<groupId>org.sonatype.central</groupId>
250+
<artifactId>central-publishing-maven-plugin</artifactId>
251+
<version>${central-publish-plugin.version}</version>
252+
</plugin>
247253
<plugin>
248254
<groupId>org.apache.maven.plugins</groupId>
249255
<artifactId>maven-gpg-plugin</artifactId>
@@ -431,6 +437,15 @@ limitations under the License.
431437
<id>release</id>
432438
<build>
433439
<plugins>
440+
<plugin>
441+
<groupId>org.sonatype.central</groupId>
442+
<artifactId>central-publishing-maven-plugin</artifactId>
443+
<extensions>true</extensions>
444+
<configuration>
445+
<deploymentName>Build Tools ${project.version}</deploymentName>
446+
<publishingServerId>sonatype</publishingServerId>
447+
</configuration>
448+
</plugin>
434449
<plugin>
435450
<groupId>org.apache.maven.plugins</groupId>
436451
<artifactId>maven-gpg-plugin</artifactId>

0 commit comments

Comments
 (0)