Skip to content

Commit 0a4d1ef

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Migrate to central-publishing-maven-plugin.
This is like cl/782079419 but for our other projects. (Specifically, I covered Guava and all the projects with `pom.xml` files that I'm used to updating for a new Guava release. I haven't tried to find any projects we run _without_ Guava dependencies (if any) or any that use Bazel instead of Maven.) As in the previous CL, I have updated the GitHub CI repository secrets as described in https://central.sonatype.org/publish/generate-portal-token/, **but** I have done so only for projects where I have deployment permission (specifically, Compile-Testing, Guava, and Truth). The others (Auto and Caliper) will need to be updated by someone who has publication permission for those projects. (Actually, it looks like Caliper doesn't actually deploy CI snapshots, even though it seems to have Sonatype credentials saved in GitHub. Hmm.) And CI snapshot releases aside, anyone who wants to deploy a "true" release will need to enter a token into `~/.m2/settings.xml`, again as discussed in cl/782079419. RELNOTES=n/a PiperOrigin-RevId: 785997601
1 parent 0fad76f commit 0a4d1ef

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

android/pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,13 +438,11 @@
438438
<distributionManagement>
439439
<snapshotRepository>
440440
<id>sonatype-nexus-snapshots</id>
441-
<name>Sonatype Nexus Snapshots</name>
442-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
441+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
443442
</snapshotRepository>
444443
<repository>
445444
<id>sonatype-nexus-staging</id>
446445
<name>Nexus Release Repository</name>
447-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
448446
</repository>
449447
<site>
450448
<id>guava-site</id>
@@ -494,6 +492,15 @@
494492
</execution>
495493
</executions>
496494
</plugin>
495+
<plugin>
496+
<groupId>org.sonatype.central</groupId>
497+
<artifactId>central-publishing-maven-plugin</artifactId>
498+
<version>0.8.0</version>
499+
<extensions>true</extensions>
500+
<configuration>
501+
<publishingServerId>central</publishingServerId>
502+
</configuration>
503+
</plugin>
497504
</plugins>
498505
</build>
499506
</profile>

pom.xml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,11 @@
433433
<distributionManagement>
434434
<snapshotRepository>
435435
<id>sonatype-nexus-snapshots</id>
436-
<name>Sonatype Nexus Snapshots</name>
437-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
436+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
438437
</snapshotRepository>
439438
<repository>
440439
<id>sonatype-nexus-staging</id>
441440
<name>Nexus Release Repository</name>
442-
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
443441
</repository>
444442
<site>
445443
<id>guava-site</id>
@@ -489,6 +487,15 @@
489487
</execution>
490488
</executions>
491489
</plugin>
490+
<plugin>
491+
<groupId>org.sonatype.central</groupId>
492+
<artifactId>central-publishing-maven-plugin</artifactId>
493+
<version>0.8.0</version>
494+
<extensions>true</extensions>
495+
<configuration>
496+
<publishingServerId>central</publishingServerId>
497+
</configuration>
498+
</plugin>
492499
</plugins>
493500
</build>
494501
</profile>

0 commit comments

Comments
 (0)