Skip to content

Commit f2d1871

Browse files
committed
Switch from OSSRH to Maven Publisher API.
Closes #917
1 parent 724860a commit f2d1871

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

pom.xml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<groupId>org.springframework.vault</groupId>
@@ -56,7 +58,7 @@
5658
<doc.resources>${project.build.directory}/doc-resources</doc.resources>
5759

5860
<!-- To be overridden by individual modules -->
59-
<java-module-name />
61+
<java-module-name/>
6062
</properties>
6163

6264
<inceptionYear>2016</inceptionYear>
@@ -690,6 +692,13 @@
690692
<version>1.7.0</version>
691693
</plugin>
692694

695+
<plugin>
696+
<groupId>org.sonatype.central</groupId>
697+
<artifactId>central-publishing-maven-plugin</artifactId>
698+
<version>0.7.0</version>
699+
<extensions>true</extensions>
700+
</plugin>
701+
693702
</plugins>
694703
</pluginManagement>
695704
</build>
@@ -758,13 +767,13 @@
758767

759768
</plugins>
760769
</build>
761-
762770
</profile>
763771

764772
<profile>
765773
<id>release</id>
766774
<build>
767775
<plugins>
776+
768777
<plugin>
769778
<groupId>org.apache.maven.plugins</groupId>
770779
<artifactId>maven-release-plugin</artifactId>
@@ -816,6 +825,7 @@
816825
</dependency>
817826
</dependencies>
818827
</plugin>
828+
819829
</plugins>
820830
</build>
821831
</profile>
@@ -857,20 +867,9 @@
857867

858868
<id>central</id>
859869

860-
<distributionManagement>
861-
<snapshotRepository>
862-
<id>sonatype-nexus-snapshots</id>
863-
<name>Sonatype Nexus Snapshots</name>
864-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/
865-
</url>
866-
</snapshotRepository>
867-
<repository>
868-
<id>sonatype-nexus-staging</id>
869-
<name>Nexus Release Repository</name>
870-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
871-
</url>
872-
</repository>
873-
</distributionManagement>
870+
<properties>
871+
<skipTests>true</skipTests>
872+
</properties>
874873

875874
<build>
876875
<plugins>
@@ -902,20 +901,28 @@
902901
</executions>
903902
</plugin>
904903

904+
<plugin>
905+
<groupId>org.sonatype.central</groupId>
906+
<artifactId>central-publishing-maven-plugin</artifactId>
907+
<configuration>
908+
<deploymentName>Spring Vault ${project.version}</deploymentName>
909+
<publishingServerId>central</publishingServerId>
910+
<autoPublish>true</autoPublish>
911+
</configuration>
912+
</plugin>
913+
905914
</plugins>
906915
</build>
907916

908917
</profile>
909918

910919
<profile>
911-
912920
<!--
913921
Profile to be activated when building the distribution artifacts.
914922
915923
Generates reference documentation, aggregates JavaDoc etc. Has to be combined with
916924
profiles "release" or "milestone" to deploy artifacts into the appropriate places.
917925
-->
918-
919926
<id>distribute</id>
920927

921928
<properties>
@@ -925,11 +932,7 @@
925932
</properties>
926933

927934
<build>
928-
929935
<plugins>
930-
<!--
931-
Configures JavaDoc generation.
932-
-->
933936

934937
<plugin>
935938
<groupId>org.apache.maven.plugins</groupId>
@@ -1001,14 +1004,11 @@
10011004
</pluginManagement>
10021005

10031006
<plugins>
1004-
10051007
<plugin>
10061008
<groupId>org.jfrog.buildinfo</groupId>
10071009
<artifactId>artifactory-maven-plugin</artifactId>
10081010
</plugin>
1009-
10101011
</plugins>
1011-
10121012
</build>
10131013
</profile>
10141014
<profile>

settings.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
<password>${env.ARTIFACTORY_PSW}</password>
2626
</server>
2727
<server>
28-
<id>sonatype-nexus-staging</id>
29-
<username>${env.SONATYPE_USR}</username>
30-
<password>${env.SONATYPE_PSW}</password>
28+
<id>central</id>
29+
<username>${env.CENTRAL_TOKEN_USERNAME}</username>
30+
<password>${env.CENTRAL_TOKEN_PASSWORD}</password>
3131
</server>
3232
</servers>
3333

0 commit comments

Comments
 (0)