Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f20021f

Browse files
chore: Migrate release workflow to Maven Central (#762)
Signed-off-by: Ricardo Zanini <[email protected]>
1 parent cfe3c77 commit f20021f

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
distribution: temurin
3636
java-version: 17
3737
cache: 'maven'
38-
server-id: ossrh
38+
server-id: central
3939
server-username: MAVEN_USERNAME
4040
server-password: MAVEN_PASSWORD
4141

@@ -51,7 +51,7 @@ jobs:
5151
cat release.properties
5252
git checkout ${{github.base_ref}}
5353
git rebase release
54-
mvn -B release:perform -Prelease -Darguments="-DperformRelease"
54+
mvn -B release:perform -Prelease
5555
env:
5656
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5757
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}

pom.xml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<version.jsonschema2pojo-maven-plugin>1.2.2</version.jsonschema2pojo-maven-plugin>
7272
<version.javadoc.plugin>3.11.3</version.javadoc.plugin>
7373
<version.org.codehaus.mojo>3.5.1</version.org.codehaus.mojo>
74+
<version.org.sonatype.central>0.8.0</version.org.sonatype.central>
7475
<version.release.plugin>3.1.1</version.release.plugin>
7576
<version.source.plugin>3.3.1</version.source.plugin>
7677
<version.surefire.plugin>3.5.3</version.surefire.plugin>
@@ -393,14 +394,14 @@
393394
<pluginManagement>
394395
<plugins>
395396
<plugin>
396-
<groupId>org.sonatype.plugins</groupId>
397-
<artifactId>nexus-staging-maven-plugin</artifactId>
398-
<version>${version.nexus.plugin}</version>
397+
<groupId>org.sonatype.central</groupId>
398+
<artifactId>central-publishing-maven-plugin</artifactId>
399+
<version>${version.org.sonatype.central}</version>
399400
<extensions>true</extensions>
400401
<configuration>
401-
<serverId>ossrh</serverId>
402-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
403-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
402+
<publishingServerId>central</publishingServerId>
403+
<autoPublish>true</autoPublish>
404+
<waitUntil>published</waitUntil>
404405
</configuration>
405406
</plugin>
406407
<plugin>
@@ -578,17 +579,6 @@
578579
</pluginManagement>
579580
</build>
580581

581-
<distributionManagement>
582-
<snapshotRepository>
583-
<id>ossrh-snapshots</id>
584-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
585-
</snapshotRepository>
586-
<repository>
587-
<id>ossrh</id>
588-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
589-
</repository>
590-
</distributionManagement>
591-
592582
<pluginRepositories>
593583
<pluginRepository>
594584
<id>central</id>

0 commit comments

Comments
 (0)