[
https://issues.apache.org/jira/browse/KUDU-3610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985926#comment-17985926
]
ASF subversion and git services commented on KUDU-3610:
-------------------------------------------------------
Commit bc852ca38327361e359427e5c5360a29359b1b27 in kudu's branch
refs/heads/branch-1.18.x from zchovan
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=bc852ca38 ]
[java] KUDU-3657: fix publishing
The changes introduced in KUDU-3610 have fixed the POM generation for
the kudu-hive java module, however the publishing for other modules were
broken as a side-effect. This patch aims to fix these issues.
The change in publishing.gradle file checks if the implementation and shadow
configurations are present to calculate the correct pom to be generated.
If they are not present for the given module, they are simply filled out
as empty arrays.
Additionally, the skipping of publishing wasn't working, this needed to
be fixed for the following modules (to keep in alignment with pre-gradle
upgrade behaviour):
* kudu-backup-common
* kudu-jepsen
* kudu-proto
* kudu-subprocess
Fixed the generated jar names of the following modules:
* kudu-backup -> kudu-backup3_2.12
* kudu-spark -> kudu-spark3_2.12
* kudu-spark-tools -> kudu-spark3-tools_2.12
Changed the compileUnshaded configuration to be extending the
compileOnly configuration. This was necessary to correct the scope of
these dependencies. This change also made it necessary to add the
compileUnshaded dependencies explicitly to the test compile path as
well[0].
[0] https://blog.gradle.org/introducing-compile-only-dependencies
Change-Id: Ie045805a68bfcd16325e1e4dbb38653cefe3a4b0
Reviewed-on: http://gerrit.cloudera.org:8080/22768
Reviewed-by: Abhishek Chennaka <[email protected]>
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
(cherry picked from commit 6d72d4a242076468501f3430b9a2cd050c634be2)
Reviewed-on: http://gerrit.cloudera.org:8080/23079
Reviewed-by: Marton Greber <[email protected]>
Tested-by: Marton Greber <[email protected]>
> KUDU-3551 introduced new unnecessary dependencies for kudu-client.jar
> ---------------------------------------------------------------------
>
> Key: KUDU-3610
> URL: https://issues.apache.org/jira/browse/KUDU-3610
> Project: Kudu
> Issue Type: Bug
> Components: java
> Affects Versions: 1.18.0
> Reporter: Joe McDonnell
> Assignee: Zoltan Chovan
> Priority: Major
> Attachments: kudu-client-a9d42cdb84.pom, kudu-client-e742f86f6d.pom
>
>
> When working on fixing IMPALA-13309, I was upgrading Kudu from
> [e742f86f6d|https://github.com/apache/kudu/commit/e742f86f6d] to
> [a9d42cdb84|https://github.com/apache/kudu/commit/a9d42cdb8438858cf1bd18c203d1687ed5734346],
> which is past the upgrade to Gradle 7.6.4 in
> [e456bc7758|https://github.com/apache/kudu/commit/e456bc775805d4555d99ce12d04e3ca0b8950760]
> (KUDU-3551). When using this new version, Impala's build fails with a
> message like this:
>
> {noformat}
> 15:24:49 [ERROR] Failed to execute goal on project impala-frontend: Could not
> resolve dependencies for project
> org.apache.impala:impala-frontend:jar:4.5.0-SNAPSHOT: Failed to collect
> dependencies at org.apache.kudu:kudu-client:jar:a9d42cdb84 ->
> org.apache.kudu:kudu-proto:jar:a9d42cdb84: Failed to read artifact descriptor
> for org.apache.kudu:kudu-proto:jar:a9d42cdb84: Could not transfer artifact
> org.apache.kudu:kudu-proto:pom:a9d42cdb84 from/to impala.cdp.repo (yadda
> yadda yadda)
> {noformat}
>
> Impala builds and publishes kudu-client.jar, but we currently don't publish
> kudu-proto.jar. This was fine on the old Kudu version, because
> kudu-client.jar is a shaded jar and does not have a runtime dependency on
> kudu-proto.jar. After the upgrade to Gradle 7.6.4, kudu-client.jar gains a
> runtime dependency on kudu-proto.jar and a few other dependencies (guava,
> netty, etc). These extra runtime dependencies should not be needed, because
> they are included in the shaded jar.
> I have attached the kudu-client.pom files from before and after for
> comparison:
> Before: [^kudu-client-e742f86f6d.pom]
> After: [^kudu-client-a9d42cdb84.pom]
> To produce this file during development, run this from the java directory:
> {noformat}
> ./gradlew -Dmaven.repo.local=/path/to/a/local/directory
> :kudu-client:publishToMavenLocal{noformat}
> Then, the new pom file will be under the
> /path/to/a/local/directory/org/apache/kudu/kudu-client/1.18.0-SNAPSHOT/
> directory.
> It would be good for the dependencies to be as restricted as before. I think
> we can get around some of these dependencies by using "compileOnly" rather
> than "implementation".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)