Switch from OSSRH to Maven Publisher API.

Closes #917
This commit is contained in:
Mark Paluch
2025-06-05 14:19:12 +02:00
parent c971bb6e88
commit fc45bd69e9
2 changed files with 29 additions and 29 deletions

52
pom.xml
View File

@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.vault</groupId>
@@ -54,7 +56,7 @@
<doc.resources>${project.build.directory}/doc-resources</doc.resources>
<!-- To be overridden by individual modules -->
<java-module-name />
<java-module-name/>
</properties>
<inceptionYear>2016</inceptionYear>
@@ -676,6 +678,13 @@
<version>1.7.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.7.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
</build>
@@ -744,13 +753,13 @@
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
@@ -802,6 +811,7 @@
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
@@ -843,20 +853,9 @@
<id>central</id>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/
</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
</distributionManagement>
<properties>
<skipTests>true</skipTests>
</properties>
<build>
<plugins>
@@ -888,20 +887,28 @@
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<configuration>
<deploymentName>Spring Vault ${project.version}</deploymentName>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--
Profile to be activated when building the distribution artifacts.
Generates reference documentation, aggregates JavaDoc etc. Has to be combined with
profiles "release" or "milestone" to deploy artifacts into the appropriate places.
-->
<id>distribute</id>
<properties>
@@ -911,11 +918,7 @@
</properties>
<build>
<plugins>
<!--
Configures JavaDoc generation.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -987,14 +990,11 @@
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
<profile>

View File

@@ -25,9 +25,9 @@
<password>${env.ARTIFACTORY_PSW}</password>
</server>
<server>
<id>sonatype-nexus-staging</id>
<username>${env.SONATYPE_USR}</username>
<password>${env.SONATYPE_PSW}</password>
<id>central</id>
<username>${env.CENTRAL_TOKEN_USERNAME}</username>
<password>${env.CENTRAL_TOKEN_PASSWORD}</password>
</server>
</servers>