Skip to content

Commit bd118b0

Browse files
committed
Use Maven Central plugin for deployment
1 parent 24ddb5e commit bd118b0

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ jobs:
158158
mvn clean install -B -U -e -Pdeploying
159159
- name: Deploy snapshot artifacts
160160
run: |
161-
echo "<settings><servers><server><id>ossrh</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
161+
echo "<settings><servers><server><id>central</id><username>${{ secrets.CI_DEPLOY_USERNAME }}</username><password>${{ secrets.CI_DEPLOY_PASSWORD }}</password></server></servers></settings>" > $HOME/.m2/settings.xml
162162
mvn deploy -Pdeploying -B -e -Dmaven.test.skip=true

pom.xml

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,6 @@
8181
</pluginRepository>
8282
</pluginRepositories>
8383

84-
<!--
85-
Deploys to OSSRH/Maven central
86-
We don't need to deploy to Bintray, as JCenter will eventually proxy artifacts upload in Maven
87-
central. See Sonatype requirements at http://central.sonatype.org/pages/apache-maven.html
88-
-->
89-
<distributionManagement>
90-
<snapshotRepository>
91-
<id>central</id>
92-
<url>https://central.sonatype.com/repository/maven-snapshots</url>
93-
</snapshotRepository>
94-
<repository>
95-
<id>ossrh</id>
96-
<url>
97-
https://oss.sonatype.org/service/local/staging/deployByRepositoryId/${stagingRepositoryId}/
98-
</url>
99-
</repository>
100-
</distributionManagement>
101-
10284
<dependencyManagement>
10385
<dependencies>
10486
<dependency>
@@ -512,7 +494,6 @@
512494
</execution>
513495
</executions>
514496
</plugin>
515-
<!-- GPG signed components: http://central.sonatype.org/pages/apache-maven.html#gpg-signed-components -->
516497
<plugin>
517498
<groupId>org.apache.maven.plugins</groupId>
518499
<artifactId>maven-gpg-plugin</artifactId>
@@ -607,7 +588,17 @@
607588
</java>
608589
</configuration>
609590
</plugin>
591+
<plugin>
592+
<groupId>org.sonatype.central</groupId>
593+
<artifactId>central-publishing-maven-plugin</artifactId>
594+
<version>0.9.0</version>
595+
<extensions>true</extensions>
596+
<configuration>
597+
<publishingServerId>central</publishingServerId>
598+
</configuration>
599+
</plugin>
610600
</plugins>
601+
611602
<pluginManagement>
612603
<plugins>
613604
<plugin>

0 commit comments

Comments
 (0)