Skip to content

Commit 8366fa8

Browse files
committed
Fixing published to maven central issues
1 parent c122fe1 commit 8366fa8

File tree

4 files changed

+81
-82
lines changed

4 files changed

+81
-82
lines changed

.github/workflows/new-maven-central-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
2828
- name: Release to Sonatype OSSRH
2929
env:
30-
SONATYPE_USER: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
31-
SONATYPE_PASSWORD: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
30+
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
31+
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
3232
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
3333
run: |
3434
./mvnw -B clean install -DskipTests

pom.xml

Lines changed: 36 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -874,43 +874,42 @@
874874
</distributionManagement>
875875
</profile>
876876
<profile>
877-
<id>sonatype</id>
878-
<properties>
879-
<maven.test.skip>true</maven.test.skip>
880-
</properties>
881-
<build>
882-
<plugins>
883-
<plugin>
884-
<groupId>org.apache.maven.plugins</groupId>
885-
<artifactId>maven-gpg-plugin</artifactId>
886-
<executions>
887-
<execution>
888-
<id>sign-artifacts</id>
889-
<phase>verify</phase>
890-
<goals>
891-
<goal>sign</goal>
892-
</goals>
893-
</execution>
894-
</executions>
895-
<configuration>
896-
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
897-
</configuration>
898-
</plugin>
899-
<plugin>
900-
<groupId>org.sonatype.plugins</groupId>
901-
<artifactId>nexus-staging-maven-plugin</artifactId>
902-
<version>1.7.0</version>
903-
<extensions>true</extensions>
904-
<configuration>
905-
<serverId>sonatype-new</serverId>
906-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
907-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
908-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
909-
</configuration>
910-
</plugin>
911-
</plugins>
912-
</build>
913-
</profile>
877+
<id>sonatype</id>
878+
<properties>
879+
<maven.test.skip>true</maven.test.skip>
880+
</properties>
881+
<build>
882+
<plugins>
883+
<plugin>
884+
<groupId>org.apache.maven.plugins</groupId>
885+
<artifactId>maven-gpg-plugin</artifactId>
886+
<executions>
887+
<execution>
888+
<id>sign-artifacts</id>
889+
<phase>verify</phase>
890+
<goals>
891+
<goal>sign</goal>
892+
</goals>
893+
</execution>
894+
</executions>
895+
<configuration>
896+
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
897+
</configuration>
898+
</plugin>
899+
<plugin>
900+
<groupId>org.sonatype.central</groupId>
901+
<artifactId>central-publishing-maven-plugin</artifactId>
902+
<extensions>true</extensions>
903+
<configuration>
904+
<publishingServerId>central</publishingServerId>
905+
<autoPublish>true</autoPublish>
906+
</configuration>
907+
</plugin>
908+
</plugins>
909+
</build>
910+
</profile>
911+
912+
914913
</profiles>
915914

916915
<dependencyManagement>

settings.xml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@
3636
<password>${env.ARTIFACTORY_PASSWORD}</password>
3737
</server>
3838

39-
<server>
40-
<id>sonatype-new</id>
41-
<username>${env.SONATYPE_USER}</username>
42-
<password>${env.SONATYPE_PASSWORD}</password>
43-
</server>
39+
<server>
40+
<id>central</id>
41+
<username>${env.CENTRAL_TOKEN_USERNAME}</username>
42+
<password>${env.CENTRAL_TOKEN_PASSWORD}</password>
43+
</server>
44+
4445
</servers>
4546

4647
</settings>

spring-ai-bom/pom.xml

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,44 +1358,43 @@
13581358
</repository>
13591359
</distributionManagement>
13601360
</profile>
1361-
<profile>
1362-
<id>sonatype</id>
1363-
<properties>
1364-
<maven.test.skip>true</maven.test.skip>
1365-
</properties>
1366-
<build>
1367-
<plugins>
1368-
<plugin>
1369-
<groupId>org.apache.maven.plugins</groupId>
1370-
<artifactId>maven-gpg-plugin</artifactId>
1371-
<executions>
1372-
<execution>
1373-
<id>sign-artifacts</id>
1374-
<phase>verify</phase>
1375-
<goals>
1376-
<goal>sign</goal>
1377-
</goals>
1378-
</execution>
1379-
</executions>
1380-
<configuration>
1381-
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
1382-
</configuration>
1383-
</plugin>
1384-
<plugin>
1385-
<groupId>org.sonatype.plugins</groupId>
1386-
<artifactId>nexus-staging-maven-plugin</artifactId>
1387-
<version>1.7.0</version>
1388-
<extensions>true</extensions>
1389-
<configuration>
1390-
<serverId>sonatype-new</serverId>
1391-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
1392-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
1393-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
1394-
</configuration>
1395-
</plugin>
1396-
</plugins>
1397-
</build>
1398-
</profile>
1361+
<profile>
1362+
<id>sonatype</id>
1363+
<properties>
1364+
<maven.test.skip>true</maven.test.skip>
1365+
</properties>
1366+
<build>
1367+
<plugins>
1368+
<plugin>
1369+
<groupId>org.sonatype.central</groupId>
1370+
<artifactId>central-publishing-maven-plugin</artifactId>
1371+
<version>0.8.0</version>
1372+
<extensions>true</extensions>
1373+
<configuration>
1374+
<publishingServerId>central</publishingServerId>
1375+
<autoPublish>true</autoPublish>
1376+
</configuration>
1377+
</plugin>
1378+
<plugin>
1379+
<groupId>org.apache.maven.plugins</groupId>
1380+
<artifactId>maven-gpg-plugin</artifactId>
1381+
<version>3.2.5</version>
1382+
<executions>
1383+
<execution>
1384+
<id>sign-artifacts</id>
1385+
<phase>verify</phase>
1386+
<goals>
1387+
<goal>sign</goal>
1388+
</goals>
1389+
</execution>
1390+
</executions>
1391+
<configuration>
1392+
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
1393+
</configuration>
1394+
</plugin>
1395+
</plugins>
1396+
</build>
1397+
</profile>
13991398
</profiles>
14001399

14011400
</project>

0 commit comments

Comments
 (0)