-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow to configure POM for ZIP publication #3252
Conversation
@dblock @prudhvigodithi could you folks please take a look? |
✅ Gradle Check success a64bf2be45c203668557721b84c61f2978f3f22f |
✅ Gradle Check success 4402e7772f8ec08e360e2855bb50f9697d66cf80 |
Hey @reta please check this comment added on opensearch-plugin-template-java PR. |
Signed-off-by: Andriy Redko <[email protected]>
@prudhvigodithi I think we are getting there - clean and concise way to customize plugin's ZIP POM file:
|
Hey @reta, looks to me this neat, but this is only for zip's right, for jars, users need to declare it separately again? if so it should be fine as well, as we might need to isolate the pom fields for both, in future we might have unique fields per publication. |
mavenZip.setArtifactId(zipArtifact); | ||
mavenZip.setVersion(zipVersion); | ||
}); | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reta we need this if/else condition so that user can declare a publication of pluginZip
and pom fields ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
@@ -72,10 +82,8 @@ public void apply(Project project) { | |||
} | |||
Task publishPluginZipPublicationToZipStagingRepository = project.getTasks() | |||
.findByName("publishPluginZipPublicationToZipStagingRepository"); | |||
if (validatePluginZipPom != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might still need this @reta
The reason I have added this because I got the following warning
Error:
> Task :validatePluginZipPom
Execution optimizations have been disabled for task ':validatePluginZipPom' to ensure correctness due to the following reasons:
- Gradle detected a problem with the following location: '/usr/share/opensearch/git/opensearch-plugin-template-java/build/distributions/rename-unspecified.pom'. Reason: Task ':validatePluginZipPom' uses this output of task ':generatePomFileForNebulaPublication' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validatePluginZipPom
is above, I did not touch it: https://github.com/opensearch-project/OpenSearch/pull/3252/files/7720ae0d0412a97b77d1077be08cca6a95eedecf#diff-2a5851da2408bbeb8733433421917f253614fffe49449da0dd315a15ed8cdf74R80
This condition should be for publishPluginZipPublicationToZipStagingRepository
, not validatePluginZipPom
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol my bad, this formatting looks like it was removed, yes I can see those 2 conditions are not touched.
Correct, this is per publication |
Hey @reta |
@prudhvigodithi I assume you pulled this pull request, republished local artifacts and used 3.0.0-SNAPSHOT version for
|
Hey @reta i'm testing with actual plugin, above seems to my local gradle cache issue, but still I get another error as
job-scheduler build.gradle |
@prudhvigodithi sorry, I have difficulties to follow what you are doing, these are the changes I did https://github.com/opensearch-project/job-scheduler/compare/main...reta:publishzip?expand=1 |
@reta now I get this, why testing fails, as |
Once merged, I will update the existing opensearch-plugin-template-java PR https://github.com/opensearch-project/opensearch-plugin-template-java/pull/31/files with new POM declaration format. |
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit f5c0b30)
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit f5c0b30)
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit f5c0b30) Co-authored-by: Andriy Redko <[email protected]>
Signed-off-by: Andriy Redko <[email protected]> (cherry picked from commit f5c0b30) Co-authored-by: Andriy Redko <[email protected]>
Created a PR @dblock opensearch-project/opensearch-plugins#149, please check. |
Signed-off-by: Andriy Redko [email protected]
Description
Allow to configure POM for ZIP publication using DSL
Issues Resolved
Related to opensearch-project/opensearch-plugin-template-java#31
Check List
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.