forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further simplification of the ZIP publication implementation
This is WIP, and I am kindly asking for a feedback. This is a follow-up to PR opensearch-project#4156 and brings in a further simplification of the ZIP publication implementation and a new gradle test. In the mentioned PR we specifically implemented the functionality to use `project.group` value for the `artifactId` and if there was an override provided by user (ie the `groupId` value was explicitly specified in POM configuration) then it was used instead. Further, we were explicitly setting the artifactId and version as well. But in fact all this has been already happening under the hood (by the libraries that do the heavy lifting of publication tasks processing). There is really no need to (re-)implement it again. As we can see from the modified code and tests that we can perfectly remove almost all the ZIP publication initialization code and all the things still work as expected. And I think it is because this is how the Project Object Model (POM) was designed to work. Because of that the condition to test the groupId presence: `if groupId == null` was useless. It was never `true`. If the `project.group` is not defined the publication task fails with an exception (we test it), if there is a custom `groupId` value setup in publication config then it overrides the `project.group` as well. Again, we test it. :-) I added new tests: - to verify we can run "publishToMavenLocal" and get expected results. The inspiration for this comes from opensearch-project/opensearch-plugin-template-java#35 - to verify that applying only the 'opensearch.pluginzip' is enough, because it adds both the NebulaPublish and MavenPublishPlugin plugins automatically. - to verify that if the plugin is applied but no publication is defined then a message is printed for the user. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
- Loading branch information
1 parent
51a529f
commit 49ce45b
Showing
10 changed files
with
327 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.