Skip to content

Commit e11f020

Browse files
authored
chore: OSSRH sunset, move to central publisher portal (#191)
Signed-off-by: Yashash H L <[email protected]>
1 parent 71f2a6d commit e11f020

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
lines changed

.github/workflows/maven-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ jobs:
2525
with:
2626
java-version: '11'
2727
distribution: 'temurin'
28-
server-id: ossrh
28+
server-id: central
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131
settings-path: ${{ github.workspace }} # location for the settings.xml file
3232

3333
- name: Publish to the Maven Central Repository
34-
run: mvn -DcentralRelease=true -P ossrh deploy -s $GITHUB_WORKSPACE/settings.xml
34+
run: mvn -DcentralRelease=true -P central deploy -s $GITHUB_WORKSPACE/settings.xml
3535
env:
36-
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
37-
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
36+
MAVEN_USERNAME: ${{ secrets.MVN_CENTRAL_USERNAME }}
37+
MAVEN_PASSWORD: ${{ secrets.MVN_CENTRAL_PASSWORD }}
3838

3939
- name: Set up Java for publishing to GitHub Packages
4040
uses: actions/setup-java@v3

pom.xml

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
</distributionManagement>
4949
</profile>
5050
<profile>
51-
<id>ossrh</id>
51+
<id>central</id>
5252
<activation>
5353
<property>
5454
<name>centralRelease</name>
@@ -72,28 +72,16 @@
7272
</executions>
7373
</plugin>
7474
<plugin>
75-
<groupId>org.sonatype.plugins</groupId>
76-
<artifactId>nexus-staging-maven-plugin</artifactId>
77-
<version>1.6.7</version>
75+
<groupId>org.sonatype.central</groupId>
76+
<artifactId>central-publishing-maven-plugin</artifactId>
77+
<version>0.8.0</version>
7878
<extensions>true</extensions>
7979
<configuration>
80-
<serverId>ossrh</serverId>
81-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
82-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
80+
<publishingServerId>central</publishingServerId>
8381
</configuration>
8482
</plugin>
8583
</plugins>
8684
</build>
87-
<distributionManagement>
88-
<snapshotRepository>
89-
<id>ossrh</id>
90-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
91-
</snapshotRepository>
92-
<repository>
93-
<id>ossrh</id>
94-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
95-
</repository>
96-
</distributionManagement>
9785
</profile>
9886
</profiles>
9987

settings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<password>${env.JAVA_SDK_MAVEN_PASSWORD}</password>
1111
</server>
1212
<server>
13-
<id>ossrh</id>
13+
<id>central</id>
1414
<username>${env.MAVEN_USERNAME}</username>
1515
<password>${env.MAVEN_PASSWORD}</password>
1616
</server>

0 commit comments

Comments
 (0)