Skip to content

SK-3002 bump central-publishing-maven-plugin to 0.11.0 for the Portal API - #402

Merged
Devesh-Skyflow merged 2 commits into
mainfrom
devesh/sk-3002-bump-central-publishing
Aug 3, 2026
Merged

SK-3002 bump central-publishing-maven-plugin to 0.11.0 for the Portal API#402
Devesh-Skyflow merged 2 commits into
mainfrom
devesh/sk-3002-bump-central-publishing

Conversation

@Devesh-Skyflow

Copy link
Copy Markdown
Collaborator

Problem

flowvault/v1.0.0 failed again (run 30827236957) — a different failure from the javadoc one fixed in #400. The build fully succeeded: tests, javadoc, GPG signing, all 11 artifacts staged. It then died reading the Central Portal's reply:

UnrecognizedPropertyException: Unrecognized field "warnings"
(class org.sonatype.central.publisher.client.model.DeploymentApiResponse), not marked as ignorable
(6 known properties: "deploymentId", "purls", "cherryBomUrl", "errors", "deploymentState", "deploymentName")

The Portal added a warnings field to the deployment-status response. Pinned 0.4.0 doesn't know it and doesn't ignore unknown properties, so the goal throws — after the bundle is already uploaded, which is the worst possible place to fail.

Why 0.11.0 specifically

I checked every release in between rather than jumping to latest on faith. DeploymentApiResponse fields per version:

Version Fields
0.5.0, 0.7.0 deploymentId, deploymentName, deploymentState, purls, errors, cherryBomUrl
0.8.0, 0.9.0, 0.10.0 …, errors
0.11.0 …, errors, warnings

0.5.00.10.0 would all fail identically. There is no smaller bump — 0.11.0 is the first version that works.

Why tokenAuth is removed

It stopped being a plugin parameter in 0.5.0. Verified against 0.11.0's META-INF/maven/plugin.xml: publishingServerId and autoPublish are both still present, tokenAuth is absent. Token auth is now the only mode and is driven by the server credentials, so behaviour is unchanged.

autoPublish=false is preserved in both modules — releases still stage as VALIDATED and wait for a human.

Compatibility

0.11.0 targets Java 8, so it runs fine on the release JDK 11.

Verification

mvn --batch-mode -pl flowvault -am -P maven-central deploy
[INFO] --- central-publishing-maven-plugin:0.11.0:publish (injected-central-publishing) @ skyflow-flowvault-java ---
[ERROR] Unable to get publisher server properties for server id: central: ... "server" is null

The 0.11.0 goal resolves, binds and executes with this exact configuration, with no unknown-parameter complaints. It stops only at the missing local central server credentials — which CI supplies via actions/setup-java. That's as far as this can be verified without publishing.

⚠️ Check the Portal before re-running

The failed run already uploaded the bundle. Staging completed and the Portal responded with a deploymentId, so a deployment for com.skyflow:skyflow-flowvault-java:1.0.0 almost certainly exists at https://central.sonatype.com/publishing/deployments.

  • If it's VALIDATED, you may be able to just click Publish — no re-run needed.
  • If it FAILED, Drop it first.
  • Re-running without checking creates a second deployment for the same version.

Nothing went live (autoPublish=false held), so Central's immutability hasn't been triggered.

⚠️ Separate issue worth deciding before Publish

The 11 staged files include two that look unintended for Maven Central:

skyflow-flowvault-java-1.0.0-tests.jar
skyflow-flowvault-java-1.0.0-with-common.jar

skyvault/pom.xml describes the with-common jar as comparison-only:

Produces an additional, comparison-only jar (classifier "with-common") … this attached jar exists only so japicmp can compare an apples-to-apples … surface

But shadedArtifactAttached=true attaches it as a secondary artifact, and deploy uploads every attached artifact — so a jar documented as build-internal is being published as a permanent public classifier, alongside a -tests.jar.

Not fixed here, to keep this PR to the release blocker. 0.11.0 does add an excludeArtifacts parameter that would handle it cleanly if you want that as a follow-up. Worth settling before clicking Publish, since these coordinates become permanent.

🤖 Generated with Claude Code

… API

The flowvault/v1.0.0 release built, tested, signed and uploaded all 11
artifacts, then died reading the Central Portal's reply:

  UnrecognizedPropertyException: Unrecognized field "warnings"
  (class org.sonatype.central.publisher.client.model.DeploymentApiResponse),
  not marked as ignorable

The Portal added a "warnings" field to the deployment-status response.
Pinned 0.4.0 does not know it and does not ignore unknown properties, so
the goal throws - after the bundle is already on the server, which is the
worst place to fail.

0.11.0 is the first version that fixes it. Checked every release in
between; DeploymentApiResponse fields are:

  0.5.0 / 0.7.0            deploymentId, deploymentName, deploymentState,
                           purls, errors, cherryBomUrl
  0.8.0 / 0.9.0 / 0.10.0   ... errors
  0.11.0                   ... errors, warnings

So 0.5.0-0.10.0 would all fail identically - there is no smaller bump.

tokenAuth is dropped because it stopped being a plugin parameter in
0.5.0; 0.11.0 exposes publishingServerId and autoPublish, both kept.
Token auth is now the only mode and comes from the server credentials.
0.11.0 targets Java 8, so it still runs on the release JDK 11.

Verified with 'mvn -pl flowvault -am -P maven-central deploy': the
0.11.0 goal resolves, binds and executes with this configuration, no
unknown-parameter complaints; it stops only at the missing local
'central' server credentials, which CI supplies.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.30%. Comparing base (bf4bac4) to head (c8a8d38).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##               main     #402    +/-   ##
==========================================
  Coverage     91.30%   91.30%            
- Complexity        0      454   +454     
==========================================
  Files           157      157            
  Lines          6392     6392            
  Branches        850      850            
==========================================
  Hits           5836     5836            
  Misses          364      364            
  Partials        192      192            
Flag Coverage Δ
common 88.38% <ø> (ø)
flowvault 88.65% <ø> (ø)
skyvault 94.72% <ø> (ø)
unittests-flowvault 89.67% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Module: common 88.38% <ø> (ø)
Module: skyvault 94.72% <ø> (ø)
Module: flowvault 88.65% <ø> (ø)
Service Account 86.69% <ø> (ø)
Vault Data 91.42% <ø> (ø)
Vault Tokens 99.03% <ø> (ø)
Vault Connection 100.00% <ø> (ø)
Vault Controller 85.31% <ø> (ø)
Detect 100.00% <ø> (ø)
Audit 100.00% <ø> (ø)
BIN Lookup 100.00% <ø> (ø)
Config 96.26% <ø> (ø)
Utils 89.21% <ø> (ø)
Errors 100.00% <ø> (ø)
Enums 100.00% <ø> (ø)
Logs 95.32% <ø> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf4bac4...c8a8d38. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Devesh-Skyflow

Copy link
Copy Markdown
Collaborator Author

Correction to the follow-up note in this PR's description: excludeArtifacts is not a usable way to drop the -tests / -with-common classifiers. Its filter compares against Artifact.getArtifactId(), not the classifier (verified in 0.11.0's PublishMojo bytecode), and those classifiers share the artifactId skyflow-flowvault-java with the main jar — so listing it would drop the main artifact too.

Handled properly in #404 instead, via shade's outputFile plus removing the inherited test-jar execution. #404 does not depend on this PR and is based on main.

The flowvault/v1.0.0 bundle staged 11 files, two of which are
build-internal and were about to become permanent public classifiers:

  skyflow-flowvault-java-1.0.0-tests.jar
  skyflow-flowvault-java-1.0.0-with-common.jar

Both were published for the same reason: they are ATTACHED as secondary
artifacts, and deploy uploads every attached artifact.

-with-common is the japicmp comparison jar. skyvault/pom.xml already
described it as "comparison-only", but shadedArtifactAttached is exactly
what attaches it, so the comment's intent was never enforced. Replaced
with shade's outputFile, which writes the jar and neither replaces the
main artifact nor attaches it. The output path is unchanged, so the
japicmp newVersion path needs no edit.

-tests came from the root pom's maven-jar-plugin test-jar execution,
inherited by every module. Nothing in the repo consumes a test-jar
(no <type>test-jar</type> dependency anywhere) and the release build's
tests run in-module, so the execution is removed.

Note excludeArtifacts on central-publishing-maven-plugin is NOT a usable
alternative: its filter compares against Artifact.getArtifactId(), not
the classifier, so listing skyflow-flowvault-java would drop the main
jar too.

Verified with 'mvn clean install' over the whole repo. Every module now
attaches exactly jar + sources + javadoc:

  common-1.0.0{,-sources,-javadoc}.jar
  skyflow-java-2.1.1{,-sources,-javadoc}.jar
  skyflow-flowvault-java-1.0.0{,-sources,-javadoc}.jar

japicmp:cmp still runs and passes for both skyvault and flowvault, and
target/*-with-common.jar is still produced on disk for it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Gitleaks Findings: No secrets detected. Safe to proceed!

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Semgrep Findings: Issues with Error level severity are found (Error is Highest severity in Semgrep), Please resolve the issues before merging.

@Devesh-Skyflow
Devesh-Skyflow merged commit c3ed530 into main Aug 3, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant