Skip to content

Commit fb3d52b

Browse files
committed
Switch to new Maven publishing plugin
tweak
1 parent 4f97654 commit fb3d52b

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
5858
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
5959

60+
- name: Initialize Maven settings
61+
run: mkdir -p ./.m2 && mv settings.xml ./.m2
62+
6063
- name: Publish package
6164
run: mvn --batch-mode "-Dprod.build=true" -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} clean deploy --file pom-dist.xml
6265
env:

pom-dist.xml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -725,22 +725,21 @@
725725
</configuration>
726726
</plugin>
727727
<plugin>
728-
<groupId>org.sonatype.plugins</groupId>
729-
<artifactId>nexus-staging-maven-plugin</artifactId>
730-
<version>1.6.13</version>
728+
<groupId>org.sonatype.central</groupId>
729+
<artifactId>central-publishing-maven-plugin</artifactId>
730+
<version>0.8.0</version>
731731
<extensions>true</extensions>
732732
<configuration>
733-
<serverId>ossrh</serverId>
734-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
735-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
733+
<publishingServerId>central</publishingServerId>
734+
<autoPublish>true</autoPublish>
736735
</configuration>
737736
</plugin>
738737
</plugins>
739738
</build>
740-
<distributionManagement>
739+
<!-- <distributionManagement>
741740
<snapshotRepository>
742741
<id>ossrh</id>
743742
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
744743
</snapshotRepository>
745-
</distributionManagement>
744+
</distributionManagement> -->
746745
</project>

settings.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<settings>
2+
<servers>
3+
<server>
4+
<id>central</id>
5+
<username>${env.MAVEN_USERNAME}</username>
6+
<password>${env.MAVEN_PASSWORD}</password>
7+
</server>
8+
</servers>
9+
</settings>

0 commit comments

Comments
 (0)