Skip to content

build(java): make the Java SDK modules publishable to the ASF Nexus - #980

Merged
SemyonSinchenko merged 1 commit into
apache:mainfrom
keksmd:java-sdk-publish
Nov 12, 2026
Merged

SemyonSinchenko merged 1 commit into
apache:mainfrom
keksmd:java-sdk-publish

Conversation

@keksmd

@keksmd keksmd commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Reason for this PR

Part of #979: consumers cannot depend on the pure-Java SDK today. No org.apache.graphar artifact exists on Maven Central or in the ASF snapshot repository, and the modules are not publishable as they stand: every SDK POM uses ${graphar.version} for its own and its parent's version, and the parent graphar-root is never published, so an installed POM cannot be resolved outside this reactor.

This PR prepares the build side only. It does not change the version, cut a release, or publish anything by itself.

What changes are included in this PR?

  • flatten-maven-plugin (oss mode) on graphar-info, graphar-storage-api, graphar-storage-local, graphar-storage-s3, graphar-io-api, graphar-core, and on the root POM itself (not inherited). Installed and deployed POMs carry concrete versions and no parent. The FastFFI java module and spark are untouched.
  • Root POM: the commented-out SCM and issue tracker restored with the apache/incubator-graphar URLs, plus a developers entry pointing at dev@. These are required repository metadata.
  • apache-incubator-disclaimer-resource-bundle added to the Apache parent's remote resources, so every jar carries META-INF/DISCLAIMER next to LICENSE and NOTICE.
  • .github/workflows/java-sdk-snapshot.yml: on pushes to main that touch the SDK, runs the SDK tests and mvn deploy to apache.snapshots.https (distribution management comes from the Apache parent). It refuses non-SNAPSHOT versions, runs only in apache/incubator-graphar, and has a workflow_dispatch dry run that stops at install. The same pattern is used by apache/datafusion-comet.

When #975 and the reader/writer land, their modules get the same one-line plugin entry and join SDK_MODULES.

What maintainers need to do outside this PR

  1. File an INFRA Jira ticket to configure the org.apache.graphar groupId in the ASF Nexus and provision the NEXUS_USER / NEXUS_PW secrets on this repository. Until then the deploy step fails with 401; the dry run works.
  2. The Java version is still 0.13.0-SNAPSHOT although v0.13.0 is released. I left the bump to the release manager since it also affects spark.
  3. A Maven release goes through the usual staging repository, PPMC vote, and IPMC vote, then promotion to Central.

Are these changes tested?

Locally:

  • CI-equivalent spotless:check, clean verify, and package javadoc:javadoc for info,storage-api,storage-local,io-api,storage-s3,core: green.
  • Installed the SDK, then built and ran a separate consumer project whose local repository held only graphar-info, graphar-core, graphar-storage-api and graphar-storage-local (no graphar-root). It resolves and loads org.apache.graphar.info.GraphInfo.
  • graphar-core jar contains META-INF/DISCLAIMER, LICENSE, NOTICE.
  • mvn -pl spark/graphar,java -am validate succeeds.
  • The workflow YAML parses; the deploy step itself can only be exercised once the secrets exist.

Are there any user-facing changes?

No API changes. Once the secrets are provisioned, SDK snapshots appear at https://repository.apache.org/content/repositories/snapshots/org/apache/graphar/.

Checklist

  • I have performed a self-review of my own code.
  • I have formatted my own code using make cpplint before submitting when changed files are in the cpp directory.
  • I have performed pre-commit run before commit the changed files.
  • I have added tests to prove my changes are effective.

The SDK modules declare their version through ${graphar.version} and
inherit from an unpublished root, so an installed POM cannot be resolved
by a consumer. Flatten the SDK module POMs and the root POM so published
POMs carry concrete versions and no parent, add the project SCM, issue
tracker and developers that the repository metadata needs, and bundle the
incubator DISCLAIMER into every jar next to LICENSE and NOTICE.

Add a snapshot workflow that tests and deploys the SDK modules to the ASF
snapshot repository on pushes to main, with a dry-run dispatch. It uses
the NEXUS_USER and NEXUS_PW secrets that ASF Infra provisions per
repository.
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.59%. Comparing base (923f595) to head (8cdef6d).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #980   +/-   ##
=========================================
  Coverage     77.59%   77.59%           
  Complexity      682      682           
=========================================
  Files            85       85           
  Lines          9091     9091           
  Branches       1098     1098           
=========================================
  Hits           7054     7054           
  Misses         1780     1780           
  Partials        257      257           
Flag Coverage Δ
java-info 85.48% <ø> (ø)

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

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

@keksmd

keksmd commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

@SemyonSinchenko gentle ping: this PR has been fully green since Sept 24 and is still waiting for a first review. Two more Java PRs are also up: #982 (fixes #981, io-parquet partial row ranges without an Offset Index) and #983 (reader facade for #978), both rebased onto current main with the #985 fix. And whenever you have a moment, the INFRA-ticket question for Maven Central in #979 still needs your input. Thanks!

@SemyonSinchenko SemyonSinchenko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~LGTM

@SemyonSinchenko
SemyonSinchenko merged commit 8ae0fc1 into apache:main Nov 12, 2026
5 checks passed
@SemyonSinchenko

Copy link
Copy Markdown
Member

Let's see is it working :)

@keksmd

keksmd commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

It reached Nexus but got a 401: the job env ran with empty NEXUS_USER / NEXUS_PW, so the repository secrets are not configured yet. Diagnosis and the exact next steps are in #979 (comment): an INFRA ticket for the org.apache.graphar Nexus repository, the two repository secrets, then a re-run of this workflow. As an external contributor I cannot set either up myself.

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.

3 participants