Skip to content

Commit 8716d57

Browse files
authored
OSSRH to Maven Central publishing migration (#220)
1 parent 39e11c2 commit 8716d57

File tree

2 files changed

+16
-24
lines changed

2 files changed

+16
-24
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
java-version: '11'
1616
distribution: 'temurin'
17-
server-id: ossrh
17+
server-id: central
1818
server-username: OSSRH_USER
1919
server-password: OSSRH_PASS
2020
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}

pom.xml

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,10 @@
103103
<version>3.2.7</version>
104104
</plugin>
105105
<plugin>
106-
<groupId>org.sonatype.plugins</groupId>
107-
<artifactId>nexus-staging-maven-plugin</artifactId>
108-
<version>1.7.0</version>
106+
<groupId>org.sonatype.central</groupId>
107+
<artifactId>central-publishing-maven-plugin</artifactId>
108+
<version>0.7.0</version>
109+
<extensions>true</extensions>
109110
</plugin>
110111
<plugin>
111112
<groupId>org.jacoco</groupId>
@@ -175,18 +176,6 @@
175176
</executions>
176177
</plugin>
177178

178-
<!-- Nexus staging, https://oss.sonatype.org/ -->
179-
<plugin>
180-
<groupId>org.sonatype.plugins</groupId>
181-
<artifactId>nexus-staging-maven-plugin</artifactId>
182-
<extensions>true</extensions>
183-
<configuration>
184-
<serverId>ossrh</serverId>
185-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
186-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
187-
</configuration>
188-
</plugin>
189-
190179
<!-- Code coverage -->
191180
<plugin>
192181
<groupId>org.jacoco</groupId>
@@ -226,6 +215,17 @@
226215
</execution>
227216
</executions>
228217
</plugin>
218+
219+
<!-- Maven central -->
220+
<plugin>
221+
<groupId>org.sonatype.central</groupId>
222+
<artifactId>central-publishing-maven-plugin</artifactId>
223+
<extensions>true</extensions>
224+
<configuration>
225+
<publishingServerId>central</publishingServerId>
226+
<autoPublish>true</autoPublish>
227+
</configuration>
228+
</plugin>
229229
</plugins>
230230
</build>
231231

@@ -300,12 +300,4 @@
300300
</build>
301301
</profile>
302302
</profiles>
303-
304-
<!-- Locations of the artifacts published -->
305-
<distributionManagement>
306-
<snapshotRepository>
307-
<id>ossrh</id>
308-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
309-
</snapshotRepository>
310-
</distributionManagement>
311303
</project>

0 commit comments

Comments
 (0)