Skip to content

Commit 808f7da

Browse files
committed
Fixing published to maven central issues
1 parent 469ca54 commit 808f7da

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
@@ -864,43 +864,42 @@
864864
</distributionManagement>
865865
</profile>
866866
<profile>
867-
<id>sonatype</id>
868-
<properties>
869-
<maven.test.skip>true</maven.test.skip>
870-
</properties>
871-
<build>
872-
<plugins>
873-
<plugin>
874-
<groupId>org.apache.maven.plugins</groupId>
875-
<artifactId>maven-gpg-plugin</artifactId>
876-
<executions>
877-
<execution>
878-
<id>sign-artifacts</id>
879-
<phase>verify</phase>
880-
<goals>
881-
<goal>sign</goal>
882-
</goals>
883-
</execution>
884-
</executions>
885-
<configuration>
886-
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
887-
</configuration>
888-
</plugin>
889-
<plugin>
890-
<groupId>org.sonatype.plugins</groupId>
891-
<artifactId>nexus-staging-maven-plugin</artifactId>
892-
<version>1.7.0</version>
893-
<extensions>true</extensions>
894-
<configuration>
895-
<serverId>sonatype-new</serverId>
896-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
897-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
898-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
899-
</configuration>
900-
</plugin>
901-
</plugins>
902-
</build>
903-
</profile>
867+
<id>sonatype</id>
868+
<properties>
869+
<maven.test.skip>true</maven.test.skip>
870+
</properties>
871+
<build>
872+
<plugins>
873+
<plugin>
874+
<groupId>org.apache.maven.plugins</groupId>
875+
<artifactId>maven-gpg-plugin</artifactId>
876+
<executions>
877+
<execution>
878+
<id>sign-artifacts</id>
879+
<phase>verify</phase>
880+
<goals>
881+
<goal>sign</goal>
882+
</goals>
883+
</execution>
884+
</executions>
885+
<configuration>
886+
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
887+
</configuration>
888+
</plugin>
889+
<plugin>
890+
<groupId>org.sonatype.central</groupId>
891+
<artifactId>central-publishing-maven-plugin</artifactId>
892+
<extensions>true</extensions>
893+
<configuration>
894+
<publishingServerId>central</publishingServerId>
895+
<autoPublish>true</autoPublish>
896+
</configuration>
897+
</plugin>
898+
</plugins>
899+
</build>
900+
</profile>
901+
902+
904903
</profiles>
905904

906905
<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
@@ -1328,44 +1328,43 @@
13281328
</repository>
13291329
</distributionManagement>
13301330
</profile>
1331-
<profile>
1332-
<id>sonatype</id>
1333-
<properties>
1334-
<maven.test.skip>true</maven.test.skip>
1335-
</properties>
1336-
<build>
1337-
<plugins>
1338-
<plugin>
1339-
<groupId>org.apache.maven.plugins</groupId>
1340-
<artifactId>maven-gpg-plugin</artifactId>
1341-
<executions>
1342-
<execution>
1343-
<id>sign-artifacts</id>
1344-
<phase>verify</phase>
1345-
<goals>
1346-
<goal>sign</goal>
1347-
</goals>
1348-
</execution>
1349-
</executions>
1350-
<configuration>
1351-
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
1352-
</configuration>
1353-
</plugin>
1354-
<plugin>
1355-
<groupId>org.sonatype.plugins</groupId>
1356-
<artifactId>nexus-staging-maven-plugin</artifactId>
1357-
<version>1.7.0</version>
1358-
<extensions>true</extensions>
1359-
<configuration>
1360-
<serverId>sonatype-new</serverId>
1361-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
1362-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
1363-
<keepStagingRepositoryOnFailure>true</keepStagingRepositoryOnFailure>
1364-
</configuration>
1365-
</plugin>
1366-
</plugins>
1367-
</build>
1368-
</profile>
1331+
<profile>
1332+
<id>sonatype</id>
1333+
<properties>
1334+
<maven.test.skip>true</maven.test.skip>
1335+
</properties>
1336+
<build>
1337+
<plugins>
1338+
<plugin>
1339+
<groupId>org.sonatype.central</groupId>
1340+
<artifactId>central-publishing-maven-plugin</artifactId>
1341+
<version>0.8.0</version>
1342+
<extensions>true</extensions>
1343+
<configuration>
1344+
<publishingServerId>central</publishingServerId>
1345+
<autoPublish>true</autoPublish>
1346+
</configuration>
1347+
</plugin>
1348+
<plugin>
1349+
<groupId>org.apache.maven.plugins</groupId>
1350+
<artifactId>maven-gpg-plugin</artifactId>
1351+
<version>3.2.5</version>
1352+
<executions>
1353+
<execution>
1354+
<id>sign-artifacts</id>
1355+
<phase>verify</phase>
1356+
<goals>
1357+
<goal>sign</goal>
1358+
</goals>
1359+
</execution>
1360+
</executions>
1361+
<configuration>
1362+
<!-- Passphrase consumed from MAVEN_GPG_PASSPHRASE environment variable. -->
1363+
</configuration>
1364+
</plugin>
1365+
</plugins>
1366+
</build>
1367+
</profile>
13691368
</profiles>
13701369

13711370
</project>

0 commit comments

Comments
 (0)