Skip to content

Conversation

@thongdk8
Copy link
Contributor

@thongdk8 thongdk8 commented Nov 6, 2025

Description

This PR adds Maven publishing support for the scalardb-data-loader-cli module, allowing the CLI to be published as a Maven artifact.

Currently only scalardb-data-loader-core is published, which is mainly used by the Data Loader API server (web application). We now also need to publish the CLI module because it will be used inside scalardb-cluster to create the scalardb-cluster-data-loader-cli.

Related issues and/or PRs

NA

Changes made

  • Added maven-publish plugin to the data-loader/cli/build.gradle file
  • Configured Maven publication with proper artifact ID scalardb-data-loader-cli
  • Added logic to disable shadow JAR creation during publishing tasks to avoid publishing the fat JAR to Maven Central
  • Remove unnecessary application plugin config in the scalardb-data-loader-cli and correct the main class config for the shadowJar task

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

NA

Release notes

Added Maven publishing support for the ScalarDB Data Loader CLI, enabling distribution as a Maven artifact.

@thongdk8 thongdk8 self-assigned this Nov 6, 2025
@thongdk8 thongdk8 requested review from KodaiD, Torch3333, brfrn169, feeblefakie, inv-jishnu, komamitsu and ypeckstadt and removed request for KodaiD November 6, 2025 02:02
@thongdk8 thongdk8 marked this pull request as ready for review November 6, 2025 02:03
Copilot AI review requested due to automatic review settings November 6, 2025 02:03
@ypeckstadt
Copy link
Contributor

@thongdk8 Best to mention the description of why this is needed. The fact that just publishing the core library, which will be used in the Data Loader API server(for the web application), is not enough, as we need the full CLI code as a package as well. So that we can do the same like the schema loader in the cluster repository.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR migrates the data-loader CLI module from an executable application to a publishable Maven artifact. The key change replaces the application plugin with the maven-publish plugin and adds publishing configuration to enable Maven Central deployment.

  • Removes the application plugin and its configuration
  • Adds Maven publishing configuration with POM metadata
  • Implements logic to conditionally disable fat jar creation during publishing
  • Corrects the Main-Class attribute path in the shadowJar manifest

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@thongdk8
Copy link
Contributor Author

thongdk8 commented Nov 6, 2025

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds Maven publishing support for the scalardb-data-loader-cli module, which is a necessary step for its use in other modules like scalardb-cluster. The changes correctly set up the maven-publish plugin, configure the POM details, and fix an incorrect Main-Class path in the shadowJar configuration.

My review includes two main points:

  1. A suggestion to make the logic for disabling the shadowJar during publishing more robust by using Gradle's task graph.
  2. A critical note about updating the root build.gradle to include this new module in the jreleaser configuration, which is essential for the release process to work correctly.

Overall, the changes are good, but the missing update to the root build file is a significant issue that needs to be addressed.

Copy link
Contributor

@Torch3333 Torch3333 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

Copy link
Contributor

@ypeckstadt ypeckstadt left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

Copy link
Contributor

@inv-jishnu inv-jishnu left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you.

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

Copy link
Collaborator

@brfrn169 brfrn169 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@brfrn169 brfrn169 merged commit de1b540 into master Nov 7, 2025
67 of 68 checks passed
@brfrn169 brfrn169 deleted the feat/add-publishing-for-data-loader-cli branch November 7, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants