Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport main]Only use shadowjar publication #962

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

b4sjoo
Copy link
Collaborator

@b4sjoo b4sjoo commented Jun 6, 2023

Description

This is a backport PR combining #957 and #959

Issues Resolved

This should fix the issue on missing ml-commons package when publishing ml-client artifacts. Thanks @ylwu-amzn, @prudhvigodithi, and @peterzhuamazon

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Sicheng Song <[email protected]>
@b4sjoo
Copy link
Collaborator Author

b4sjoo commented Jun 6, 2023

Quick notes: In Gradle, the publish task is used to publish artifacts to a repository, while the shadow plugin is used to create a "fat" JAR that includes all of the dependencies of a project.

When you run the publish task, Gradle publishes the artifacts specified in the publications block of your build.gradle file to a repository. By default, Gradle publishes the JAR file produced by the jar task, along with any other artifacts you specify in the publications block. You can configure the publish task to publish to different repositories, such as a local Maven repository or a remote repository like Maven Central.

On the other hand, the shadow plugin is used to create a "fat" JAR that includes all of the dependencies of a project. This can be useful for creating a self-contained JAR that can be easily distributed and run on different systems. The shadow plugin creates a new task called shadowJar, which produces the "fat" JAR. By default, the shadowJar task includes all of the dependencies of your project in the JAR file, along with your project's classes and resources.

In summary, the publish task is used to publish artifacts to a repository, while the shadow plugin is used to create a "fat" JAR that includes all of the dependencies of a project. They serve different purposes and can be used together or separately depending on your needs.

@codecov
Copy link

codecov bot commented Jun 6, 2023

Codecov Report

Merging #962 (d9f399f) into main (dd54ea5) will increase coverage by 0.06%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main     #962      +/-   ##
============================================
+ Coverage     84.73%   84.80%   +0.06%     
- Complexity     1630     1632       +2     
============================================
  Files           135      135              
  Lines          6079     6079              
  Branches        596      596              
============================================
+ Hits           5151     5155       +4     
+ Misses          669      666       -3     
+ Partials        259      258       -1     
Flag Coverage Δ
ml-commons 84.80% <ø> (+0.06%) ⬆️

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

see 1 file with indirect coverage changes

@dhrubo-os dhrubo-os merged commit a2f1913 into opensearch-project:main Jun 6, 2023
@b4sjoo b4sjoo deleted the main_gradle_fix branch June 6, 2023 19:20
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