Skip to content

Cut over to the Code Genome Project for publishing and org.openrewrite resolution - #467

Merged
timtebeek merged 3 commits into
mainfrom
tim/publish-snapshots-to-cgp
Aug 26, 2026
Merged

Cut over to the Code Genome Project for publishing and org.openrewrite resolution#467
timtebeek merged 3 commits into
mainfrom
tim/publish-snapshots-to-cgp

Conversation

@timtebeek

@timtebeek timtebeek commented Aug 19, 2026

Copy link
Copy Markdown
Member

Completes the cutover to the Code Genome Project: snapshots publish there instead of Sonatype, nothing publishes to Sonatype or Maven Central at all, and org.openrewrite/io.moderne artifacts are no longer consumed from Maven Central.

Publishing

  • plugin/build.gradle.kts registers CGP's S3 bucket as a Maven publishing repository, mirroring org.openrewrite.build.publish-cgp — this repo can't apply that plugin, since it wires nebula and gradle-nexus.publish-plugin directly. The host is region-qualified because Gradle's S3 transport otherwise defaults to us-east-1.
  • .github/workflows/ci.yml publishes :plugin:publishPluginMavenPublicationToCgpRepository with the CGP_AWS_* org secrets, replacing the Sonatype and OSSRH signing credentials. The signing properties were dead already — no signing plugin is applied anywhere in this build.
  • build.gradle.kts drops io.github.gradle-nexus.publish-plugin and its nexusPublishing block. These were vestigial: org.openrewrite:plugin was never on Maven Central (repo1.maven.org 404s for it), because releases go to the Gradle Plugin Portal via publishPlugins and nothing ever invoked publishToSonatype. cgp is now the only Maven publishing repository.

Resolution

  • Removes the central.sonatype.com/repository/maven-snapshots repository.
  • Excludes org.openrewrite and io.moderne from both mavenCentral and gradlePluginPortal (which proxies Central) whenever CGP credentials are configured, so those groups resolve from CGP alone. This follows the codegenomeConfigured pattern from rewrite-build-gradle-plugin — gating on credentials keeps fork PRs, which receive no secrets, building against Central.
  • mavenCentral stays for third-party dependencies.

Verification

Run locally with real CGP credentials, so the credentialed path was genuinely exercised rather than falling back to Central:

  • Snapshot resolution: every org.openrewrite dependency resolves from CGP at 8.91.0-SNAPSHOT with Central excluded, including the org.openrewrite.gradle.tooling subgroup.
  • Release resolution (-Preleasing): latest.release resolves to 8.90.4 from CGP.
  • Release task graph (final publishPlugins --dry-run against a throwaway local tag) is unchanged and contains no Sonatype step.
  • All *Sonatype* tasks are gone; publishPluginMavenPublicationToCgpRepository resolves through jar → javadocJar → sourcesJar → POM → publish. The build still configures cleanly with no AWS credentials present.

Worth flagging

  • Snapshots become credentialed. artifacts.codegenomeproject.org returns 401 anonymously where the Sonatype snapshot repo did not, so anyone consuming org.openrewrite:plugin:*-SNAPSHOT without credentials needs a CGP download token. README updated accordingly.
  • The publish step is not exercised by PR CI — it's gated on github.event_name != 'pull_request', so the first real upload happens on merge to main.
  • Now that cgp is the only publishing repository, :plugin:publish would also push the plugin marker (publishRewritePluginMarkerMavenPublicationToCgpRepository), which would make snapshots consumable via plugins { id("org.openrewrite.rewrite") version "…-SNAPSHOT" } and retire the useModule workaround in the README. Left out as out of scope; happy to add.

Registers CGP's S3 bucket as a Maven publishing repository, mirroring
org.openrewrite.build.publish-cgp, and points the CI publish-snapshots
step at it with the CGP AWS credentials.
@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Aug 19, 2026
@timtebeek
timtebeek marked this pull request as draft August 19, 2026 22:15
…Central

Drops the gradle-nexus publish plugin and its nexusPublishing block, which
were vestigial: org.openrewrite:plugin was never on Maven Central, as
releases go to the Gradle Plugin Portal via publishPlugins.

Removes the Sonatype snapshots repository and excludes org.openrewrite and
io.moderne from Maven Central and the plugin portal (which proxies Central)
whenever CGP credentials are configured, so those groups resolve from CGP
alone.
@timtebeek timtebeek changed the title Publish snapshots to the Code Genome Project instead of Sonatype Cut over to the Code Genome Project for publishing and org.openrewrite resolution Aug 25, 2026
@timtebeek
timtebeek marked this pull request as ready for review August 25, 2026 21:28
@timtebeek
timtebeek requested a review from MBoegers August 26, 2026 08:25
Comment thread README.md Outdated
@github-project-automation github-project-automation Bot moved this from In Progress to Ready to Review in OpenRewrite Aug 26, 2026
@timtebeek
timtebeek merged commit e2cc4dd into main Aug 26, 2026
2 checks passed
@timtebeek
timtebeek deleted the tim/publish-snapshots-to-cgp branch August 26, 2026 10:08
@github-project-automation github-project-automation Bot moved this from Ready to Review to Done in OpenRewrite Aug 26, 2026
timtebeek added a commit that referenced this pull request Aug 26, 2026
…tal (#474)

* Publish releases to the Code Genome Project as well as the plugin portal

The CGP cutover in #467 pointed the ci.yml snapshot step at
publishPluginMavenPublicationToCgpRepository but left publish.yml alone, so
tagged releases only ran publishPlugins. v7.40.0 landed on the Gradle Plugin
Portal and never reached artifacts.codegenomeproject.org.

Adds the CGP publish task and its AWS credentials to both the candidate and
release steps, mirroring ci.yml.

* Drop the publish-candidate step from the publish workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants