Migrate to central-publishing-maven-plugin

This commit is contained in:
Christian Tzolov 2025-01-28 19:36:27 +01:00
commit c78c1adcc6
3 changed files with 8 additions and 31 deletions

View file

@ -18,7 +18,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}

View file

@ -18,7 +18,7 @@ jobs:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}

35
pom.xml
View file

@ -50,13 +50,6 @@
<system>Github Actions</system>
<url>https://github.com/modelcontextprotocol/java-sdk/actions</url>
</ciManagement>
<distributionManagement>
<repository>
<id>ossrh</id>
<name>Central Repository OSSRH</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -300,19 +293,13 @@
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<!--
the property autoReleaseAfterClose set to false you can manually inspect the staging repository in
the Nexus Repository Manager and trigger a release of the staging
repository later
-->
<autoReleaseAfterClose>false</autoReleaseAfterClose>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
</configuration>
</plugin>
<plugin>
@ -338,16 +325,6 @@
</plugin>
</plugins>
</build>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</profile>
</profiles>
@ -385,4 +362,4 @@
</repository>
</repositories>
</project>
</project>