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' java-version: '17'
distribution: 'temurin' distribution: 'temurin'
cache: 'maven' cache: 'maven'
server-id: ossrh server-id: central
server-username: MAVEN_USERNAME server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} gpg-private-key: ${{ secrets.GPG_SECRET_KEY }}

View file

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

35
pom.xml
View file

@ -50,13 +50,6 @@
<system>Github Actions</system> <system>Github Actions</system>
<url>https://github.com/modelcontextprotocol/java-sdk/actions</url> <url>https://github.com/modelcontextprotocol/java-sdk/actions</url>
</ciManagement> </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> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -300,19 +293,13 @@
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.sonatype.plugins</groupId> <groupId>org.sonatype.central</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>central-publishing-maven-plugin</artifactId>
<version>1.7.0</version> <version>0.7.0</version>
<extensions>true</extensions> <extensions>true</extensions>
<configuration> <configuration>
<serverId>ossrh</serverId> <publishingServerId>central</publishingServerId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> <autoPublish>false</autoPublish>
<!--
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>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@ -338,16 +325,6 @@
</plugin> </plugin>
</plugins> </plugins>
</build> </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> </profile>
</profiles> </profiles>
@ -385,4 +362,4 @@
</repository> </repository>
</repositories> </repositories>
</project> </project>