Skip to content

Commit 63a20c4

Browse files
committed
prepare for maven release
1 parent 5f3eeff commit 63a20c4

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

.github/workflows/maven-central.yml

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

77
jobs:
88
release:
9-
name: Release on Sonatype OSS
9+
name: Maven Central
1010
runs-on: ubuntu-latest
1111

1212
steps:
@@ -24,15 +24,15 @@ jobs:
2424
with: # running setup-java again overwrites the settings.xml
2525
java-version: 17
2626
distribution: 'temurin'
27-
server-id: ossrh
28-
server-username: OSSRH_USERNAME
29-
server-password: OSSRH_PASSWORD
27+
server-id: central
28+
server-username: CENTRAL_USERNAME
29+
server-password: CENTRAL_TOKEN
3030
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
3131
gpg-passphrase: MAVEN_GPG_PASSPHRASE
3232

3333
- name: Publish to Maven Central
3434
run: mvn -pl '!tests' clean deploy -P central
3535
env:
36-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
37-
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
36+
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
37+
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}
3838
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

pom.xml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@
4848

4949
<distributionManagement>
5050
<snapshotRepository>
51-
<id>ossrh</id>
52-
<name>Sonatype Nexus Snapshots</name>
53-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
51+
<id>central</id>
52+
<name>Maven Central Snapshots</name>
53+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
5454
</snapshotRepository>
5555
<repository>
56-
<id>ossrh</id>
57-
<name>Nexus Release Repository</name>
58-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
56+
<id>central</id>
57+
<name>Maven Central Release Repository</name>
58+
<url>https://ossrh-staging-api.central.sonatype.com/service/local/</url>
5959
</repository>
6060
</distributionManagement>
6161

@@ -208,7 +208,7 @@
208208
<plugin>
209209
<groupId>com.diffplug.spotless</groupId>
210210
<artifactId>spotless-maven-plugin</artifactId>
211-
<version>2.43.0</version>
211+
<version>2.46.1</version>
212212
<configuration>
213213
<upToDateChecking>
214214
<enabled>true</enabled>
@@ -284,7 +284,7 @@
284284
<plugin>
285285
<groupId>org.codehaus.mojo</groupId>
286286
<artifactId>exec-maven-plugin</artifactId>
287-
<version>3.3.0</version>
287+
<version>3.5.1</version>
288288
<executions>
289289
<execution>
290290
<phase>initialize</phase>
@@ -405,16 +405,14 @@
405405
</executions>
406406
</plugin>
407407

408-
<!-- Deploy plugin -->
409408
<plugin>
410-
<groupId>org.sonatype.plugins</groupId>
411-
<artifactId>nexus-staging-maven-plugin</artifactId>
412-
<version>1.7.0</version>
409+
<groupId>org.sonatype.central</groupId>
410+
<artifactId>central-publishing-maven-plugin</artifactId>
411+
<version>0.8.0</version>
413412
<extensions>true</extensions>
414413
<configuration>
415-
<serverId>ossrh</serverId>
416-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
417-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
414+
<publishingServerId>central</publishingServerId>
415+
<autoPublish>true</autoPublish>
418416
</configuration>
419417
</plugin>
420418
</plugins>

0 commit comments

Comments
 (0)