Skip to content

Commit 9e0306c

Browse files
committed
chore: change to publish via OSSRH in the Central Publisher Portal
more infos: OSSRH Namespaces Are Now Visible In The Central Publisher Portal https://central.sonatype.org/news/20241007_ossrh_accounts_visible_in_portal/ What is different between Central Portal and Legacy OSSRH? https://central.sonatype.org/faq/what-is-different-between-central-portal-and-legacy-ossrh/
1 parent b255d2f commit 9e0306c

File tree

2 files changed

+12
-54
lines changed

2 files changed

+12
-54
lines changed

cffu-bom/pom.xml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,6 @@
8080
</dependencies>
8181
</dependencyManagement>
8282

83-
<distributionManagement>
84-
<snapshotRepository>
85-
<id>ossrh</id>
86-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
87-
</snapshotRepository>
88-
</distributionManagement>
89-
9083
<build>
9184
<pluginManagement>
9285
<plugins>
@@ -158,28 +151,14 @@
158151
<build>
159152
<plugins>
160153
<plugin>
161-
<groupId>org.sonatype.plugins</groupId>
162-
<artifactId>nexus-staging-maven-plugin</artifactId>
163-
<version>1.7.0</version>
154+
<!-- https://central.sonatype.org/publish/publish-portal-maven/#publishing -->
155+
<groupId>org.sonatype.central</groupId>
156+
<artifactId>central-publishing-maven-plugin</artifactId>
157+
<version>0.7.0</version>
164158
<extensions>true</extensions>
165-
<!--
166-
In multiple module builds using the deploy-at-end feature, the deployment of all components
167-
is performed in the last module based on the reactor order. If this property is set to true
168-
in the last module, all staging deployment for all modules will be skipped.
169-
so, we'll config nexus deploy after every module's `deploy` phase
170-
see: https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin#configuring-the-plugin
171-
-->
172159
<configuration>
173-
<serverId>ossrh</serverId>
174-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
175-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
176-
<!--
177-
If you are deploying to Maven Central, it is the Nexus Staging Plugin that is doing the deployment
178-
instead of the `deploy` plugin, so the configuration of the `deploy` plugin has no effect.
179-
To make the Nexus deploy plugin skip, set skipNexusStagingDeployMojo in its configuration to true.
180-
see: https://stackoverflow.com/questions/59552549/preventing-maven-modules-from-being-deployed
181-
-->
182-
<skipNexusStagingDeployMojo>${maven.deploy.skip}</skipNexusStagingDeployMojo>
160+
<publishingServerId>central</publishingServerId>
161+
<autoPublish>true</autoPublish>
183162
</configuration>
184163
</plugin>
185164
</plugins>

pom.xml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,6 @@
241241
</dependencies>
242242
</dependencyManagement>
243243

244-
<distributionManagement>
245-
<snapshotRepository>
246-
<id>ossrh</id>
247-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
248-
</snapshotRepository>
249-
</distributionManagement>
250-
251244
<build>
252245
<plugins>
253246
<plugin>
@@ -1029,28 +1022,14 @@
10291022
<build>
10301023
<plugins>
10311024
<plugin>
1032-
<groupId>org.sonatype.plugins</groupId>
1033-
<artifactId>nexus-staging-maven-plugin</artifactId>
1034-
<version>1.7.0</version>
1025+
<!-- https://central.sonatype.org/publish/publish-portal-maven/#publishing -->
1026+
<groupId>org.sonatype.central</groupId>
1027+
<artifactId>central-publishing-maven-plugin</artifactId>
1028+
<version>0.7.0</version>
10351029
<extensions>true</extensions>
1036-
<!--
1037-
In multiple module builds using the deploy-at-end feature, the deployment of all components
1038-
is performed in the last module based on the reactor order. If this property is set to true
1039-
in the last module, all staging deployment for all modules will be skipped.
1040-
so, we'll config nexus deploy after every module's `deploy` phase
1041-
see: https://github.com/sonatype/nexus-maven-plugins/tree/master/staging/maven-plugin#configuring-the-plugin
1042-
-->
10431030
<configuration>
1044-
<serverId>ossrh</serverId>
1045-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
1046-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
1047-
<!--
1048-
If you are deploying to Maven Central, it is the Nexus Staging Plugin that is doing the deployment
1049-
instead of the `deploy` plugin, so the configuration of the `deploy` plugin has no effect.
1050-
To make the Nexus deploy plugin skip, set skipNexusStagingDeployMojo in its configuration to true.
1051-
see: https://stackoverflow.com/questions/59552549/preventing-maven-modules-from-being-deployed
1052-
-->
1053-
<skipNexusStagingDeployMojo>${maven.deploy.skip}</skipNexusStagingDeployMojo>
1031+
<publishingServerId>central</publishingServerId>
1032+
<autoPublish>true</autoPublish>
10541033
</configuration>
10551034
</plugin>
10561035
</plugins>

0 commit comments

Comments
 (0)