[ 
https://issues.apache.org/jira/browse/KUDU-2043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050958#comment-16050958
 ] 

Dan Burkert commented on KUDU-2043:
-----------------------------------

This is caused by yet another unfortunate interaction between multi-module 
projects and shading.  The root cause is that shading runs late in the Maven 
reactor model.  In this case, this is causing {{kudu-spark}} to be built 
against the unshaded version of {{kudu-client}}, which includes compile scoped 
dependencies on {{guava}}.  {{kudu-spark}} thus inherits the compile-scoped 
dependency, and the shade plugin dutifully packages it into the final jar.  If 
{{kudu-spark}} is instead built against a pre-installed version of 
{{kudu-client}} which _has_ been shaded and whose compile scope dependency on 
{{guava}} has been stripped, the resulting artifact does not include bundled 
{{guava}}.

For example,

{code}
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true
{code}

will install a {{kudu-spark}} artifact which does included a bundled {{guava}}. 
 However, running the install step _again_ with just kudu-spark:

{code}
mvn clean install -DskipTests -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true 
-pl kudu-spark
{code}

will install a {{kudu-spark}} artifact without a bundled {{guava}}.  This is 
because maven uses the pre-installed and shaded {{kudu-client}} instead of the 
in-reactor non-shaded {{kudu-client}}.

I believe that this non-determinism is why in some releases kudu-spark2 is 
shaded and others kudu-spark1 is shaded - it comes down to which version the RM 
built as part of the overall build, and which came later as a separate install 
step.

> kudu java client should not shade dependencies
> ----------------------------------------------
>
>                 Key: KUDU-2043
>                 URL: https://issues.apache.org/jira/browse/KUDU-2043
>             Project: Kudu
>          Issue Type: Bug
>          Components: spark
>    Affects Versions: 1.3.0
>            Reporter: Jiahongchao
>            Priority: Minor
>
> kudu-client shade dependencies in one jar,it contains guava library which 
> conflicts with that in our hbase client jar.So I think kudu client should be 
> a shaded jar so that we can exclude its dependency.  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to