Skip to content

Commit ac6acca

Browse files
authored
JCL-471: Upgrade maven central publication mechanism (#2144)
1 parent 6e90b98 commit ac6acca

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

.github/workflows/cd-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
distribution: 'temurin'
3434
java-version: 17
3535
cache: 'maven'
36-
server-id: 'ossrh'
36+
server-id: 'central'
3737
server-username: MAVEN_REPO_USERNAME
3838
server-password: MAVEN_REPO_TOKEN
3939
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}

pom.xml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@
5656
<jar.plugin.version>3.4.2</jar.plugin.version>
5757
<javadoc.plugin.version>3.11.2</javadoc.plugin.version>
5858
<license.plugin.version>5.0.0</license.plugin.version>
59-
<nexus.plugin.version>1.7.0</nexus.plugin.version>
6059
<owasp.plugin.version>12.1.2</owasp.plugin.version>
6160
<projectinfo.plugin.version>3.9.0</projectinfo.plugin.version>
6261
<pmd.plugin.version>3.26.0</pmd.plugin.version>
6362
<site.plugin.version>3.21.0</site.plugin.version>
6463
<release.plugin.version>3.1.1</release.plugin.version>
6564
<resources.plugin.version>3.3.1</resources.plugin.version>
6665
<sonar.plugin.version>5.1.0.4751</sonar.plugin.version>
66+
<sonatype.plugin.version>0.7.0</sonatype.plugin.version>
6767
<source.plugin.version>3.3.1</source.plugin.version>
6868
<surefire.plugin.version>3.5.3</surefire.plugin.version>
6969

@@ -124,16 +124,6 @@
124124
</modules>
125125

126126
<distributionManagement>
127-
<snapshotRepository>
128-
<name>Snapshot Repository</name>
129-
<id>ossrh</id>
130-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
131-
</snapshotRepository>
132-
<repository>
133-
<name>Staging Repository</name>
134-
<id>ossrh</id>
135-
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
136-
</repository>
137127
<site child.site.url.inherit.append.path="false">
138128
<id>${project.artifactId}</id>
139129
<url>${project.baseUri}</url>
@@ -504,15 +494,9 @@
504494
<version>${sonar.plugin.version}</version>
505495
</plugin>
506496
<plugin>
507-
<groupId>org.sonatype.plugins</groupId>
508-
<artifactId>nexus-staging-maven-plugin</artifactId>
509-
<version>${nexus.plugin.version}</version>
510-
<extensions>true</extensions>
511-
<configuration>
512-
<serverId>ossrh</serverId>
513-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
514-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
515-
</configuration>
497+
<groupId>org.sonatype.central</groupId>
498+
<artifactId>central-publishing-maven-plugin</artifactId>
499+
<version>${sonatype.plugin.version}</version>
516500
</plugin>
517501
<plugin>
518502
<groupId>org.antlr</groupId>
@@ -656,6 +640,15 @@
656640
<nvdDatafeedUrl>${nvd.api.datafeed}</nvdDatafeedUrl>
657641
</configuration>
658642
</plugin>
643+
<plugin>
644+
<groupId>org.sonatype.central</groupId>
645+
<artifactId>central-publishing-maven-plugin</artifactId>
646+
<extensions>true</extensions>
647+
<configuration>
648+
<publishingServerId>central</publishingServerId>
649+
<autoPublish>true</autoPublish>
650+
</configuration>
651+
</plugin>
659652
</plugins>
660653
</build>
661654

0 commit comments

Comments
 (0)