Skip to content

Commit 1b07042

Browse files
aksOpsclaude
andcommitted
fix: move central-publishing-maven-plugin to release profile so SNAPSHOT deploys work
The central-publishing-maven-plugin with <extensions>true</extensions> was intercepting ALL mvn deploy calls, including SNAPSHOTs. This caused SNAPSHOT deploys to target Central Portal (which rejects SNAPSHOTs) instead of the OSSRH snapshot repository. Changes: - Move central-publishing-maven-plugin from default build plugins to release profile - Update snapshot URL from s01.oss.sonatype.org to central.sonatype.com/repository/maven-snapshots Now: - mvn deploy (SNAPSHOT) → maven-deploy-plugin → OSSRH snapshots - mvn deploy -P release (stable) → central-publishing-maven-plugin → Central Portal Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b99703a commit 1b07042

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

pom.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<distributionManagement>
3737
<snapshotRepository>
3838
<id>central</id>
39-
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
39+
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
4040
</snapshotRepository>
4141
</distributionManagement>
4242

@@ -306,17 +306,6 @@
306306
</configuration>
307307
</plugin>
308308

309-
<plugin>
310-
<groupId>org.sonatype.central</groupId>
311-
<artifactId>central-publishing-maven-plugin</artifactId>
312-
<version>0.10.0</version>
313-
<extensions>true</extensions>
314-
<configuration>
315-
<publishingServerId>central</publishingServerId>
316-
<autoPublish>true</autoPublish>
317-
</configuration>
318-
</plugin>
319-
320309
<!-- Source JAR (required by Maven Central) -->
321310
<plugin>
322311
<groupId>org.apache.maven.plugins</groupId>
@@ -356,6 +345,17 @@
356345
<id>release</id>
357346
<build>
358347
<plugins>
348+
<!-- Central Publishing Plugin — only for releases, NOT snapshots -->
349+
<plugin>
350+
<groupId>org.sonatype.central</groupId>
351+
<artifactId>central-publishing-maven-plugin</artifactId>
352+
<version>0.10.0</version>
353+
<extensions>true</extensions>
354+
<configuration>
355+
<publishingServerId>central</publishingServerId>
356+
<autoPublish>true</autoPublish>
357+
</configuration>
358+
</plugin>
359359
<plugin>
360360
<groupId>org.apache.maven.plugins</groupId>
361361
<artifactId>maven-source-plugin</artifactId>

0 commit comments

Comments
 (0)