Skip to content

Commit b9d741d

Browse files
cpovirkGoogle Java Core Libraries
authored andcommitted
Fix some problems with the Central Publishing Portal setup after cl/786033817:
- Stop inheriting from `oss-parent` in `guava-bom`. I'm seeing `guava-bom` try to deploy to the old `oss.sonsatype.org`, even as the other subprojects successful deploy to `central.sonatype.com`, and I believe that's a result of the parent. I put in the new Central config to compensate. (I don't remember if we have a good reason for `guava-bom` to not inherit from `guava-parent`, but I figure there's some chance we do. I could look into it.) - Skip `central-publishing-maven-plugin` for `guava-tests`, just as we did for `maven-deploy-plugin`. I haven't seen evidence that this is a problem yet, but that may be only because: - We've attempted only snapshot releases, not "full" releases? I think that some problems "like this" have appeared only during validation of full releases, at least historically. - The snapshot release failed before it even got to `guava-tests`. - Avoid mentioning `maven-deploy-plugin` in `guava-tests` and even in our `pluginManagement`. We should no longer be using it, so we shouldn't need to specify a version. - Remove entry for `sonatype-nexus-staging`. That entry may or may not actually be a "problem," but I'd meant to remove it in the previous CL for all our projects. I just missed Guava (because I started with a list of projects that _depend_ on Guava and then went back for Guava). (Here's [the log for the failure](https://github.com/google/guava/actions/runs/16457531993/job/46518814913).) RELNOTES=n/a PiperOrigin-RevId: 786078646
1 parent 961370b commit b9d741d

File tree

6 files changed

+44
-36
lines changed

6 files changed

+44
-36
lines changed

android/guava-bom/pom.xml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
<version>999.0.0-HEAD-android-SNAPSHOT</version>
1212
<packaging>pom</packaging>
1313

14-
<parent>
15-
<groupId>org.sonatype.oss</groupId>
16-
<artifactId>oss-parent</artifactId>
17-
<version>9</version>
18-
<relativePath></relativePath>
19-
</parent>
20-
2114
<name>Guava BOM</name>
2215
<description>BOM for Guava artifacts</description>
2316
<url>https://github.com/google/guava</url>
@@ -50,4 +43,23 @@
5043
</dependency>
5144
</dependencies>
5245
</dependencyManagement>
46+
47+
<profiles>
48+
<profile>
49+
<id>sonatype-oss-release</id>
50+
<build>
51+
<plugins>
52+
<plugin>
53+
<groupId>org.sonatype.central</groupId>
54+
<artifactId>central-publishing-maven-plugin</artifactId>
55+
<version>0.8.0</version>
56+
<extensions>true</extensions>
57+
<configuration>
58+
<publishingServerId>central</publishingServerId>
59+
</configuration>
60+
</plugin>
61+
</plugins>
62+
</build>
63+
</profile>
64+
</profiles>
5365
</project>

android/guava-tests/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@
9595
</executions>
9696
</plugin>
9797
<plugin>
98-
<artifactId>maven-deploy-plugin</artifactId>
99-
<version>2.8.2</version>
98+
<groupId>org.sonatype.central</groupId>
99+
<artifactId>central-publishing-maven-plugin</artifactId>
100100
<configuration>
101-
<skip>true</skip>
101+
<skipPublishing>true</skipPublishing>
102102
</configuration>
103103
</plugin>
104104
<plugin>

android/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,6 @@
219219
<artifactId>maven-dependency-plugin</artifactId>
220220
<version>3.1.1</version>
221221
</plugin>
222-
<plugin>
223-
<artifactId>maven-deploy-plugin</artifactId>
224-
<version>3.1.3</version>
225-
</plugin>
226222
<plugin>
227223
<artifactId>maven-enforcer-plugin</artifactId>
228224
<version>3.0.0-M3</version>
@@ -440,10 +436,6 @@
440436
<id>sonatype-nexus-snapshots</id>
441437
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
442438
</snapshotRepository>
443-
<repository>
444-
<id>sonatype-nexus-staging</id>
445-
<name>Nexus Release Repository</name>
446-
</repository>
447439
<site>
448440
<id>guava-site</id>
449441
<name>Guava Documentation Site</name>

guava-bom/pom.xml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
<version>999.0.0-HEAD-jre-SNAPSHOT</version>
1212
<packaging>pom</packaging>
1313

14-
<parent>
15-
<groupId>org.sonatype.oss</groupId>
16-
<artifactId>oss-parent</artifactId>
17-
<version>9</version>
18-
<relativePath></relativePath>
19-
</parent>
20-
2114
<name>Guava BOM</name>
2215
<description>BOM for Guava artifacts</description>
2316
<url>https://github.com/google/guava</url>
@@ -55,4 +48,23 @@
5548
</dependency>
5649
</dependencies>
5750
</dependencyManagement>
51+
52+
<profiles>
53+
<profile>
54+
<id>sonatype-oss-release</id>
55+
<build>
56+
<plugins>
57+
<plugin>
58+
<groupId>org.sonatype.central</groupId>
59+
<artifactId>central-publishing-maven-plugin</artifactId>
60+
<version>0.8.0</version>
61+
<extensions>true</extensions>
62+
<configuration>
63+
<publishingServerId>central</publishingServerId>
64+
</configuration>
65+
</plugin>
66+
</plugins>
67+
</build>
68+
</profile>
69+
</profiles>
5870
</project>

guava-tests/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@
101101
</executions>
102102
</plugin>
103103
<plugin>
104-
<artifactId>maven-deploy-plugin</artifactId>
105-
<version>2.8.2</version>
104+
<groupId>org.sonatype.central</groupId>
105+
<artifactId>central-publishing-maven-plugin</artifactId>
106106
<configuration>
107-
<skip>true</skip>
107+
<skipPublishing>true</skipPublishing>
108108
</configuration>
109109
</plugin>
110110
<plugin>

pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,6 @@
220220
<artifactId>maven-dependency-plugin</artifactId>
221221
<version>3.1.1</version>
222222
</plugin>
223-
<plugin>
224-
<artifactId>maven-deploy-plugin</artifactId>
225-
<version>3.1.3</version>
226-
</plugin>
227223
<plugin>
228224
<artifactId>maven-enforcer-plugin</artifactId>
229225
<version>3.0.0-M3</version>
@@ -435,10 +431,6 @@
435431
<id>sonatype-nexus-snapshots</id>
436432
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
437433
</snapshotRepository>
438-
<repository>
439-
<id>sonatype-nexus-staging</id>
440-
<name>Nexus Release Repository</name>
441-
</repository>
442434
<site>
443435
<id>guava-site</id>
444436
<name>Guava Documentation Site</name>

0 commit comments

Comments
 (0)