Re: Help with transitive shading

2016-09-21 Thread Curtis Rueden
Hi James,

> I want A's shaded classes to carry over to B.

So, your A component shades all of guava 12?

In that case, when you depend on A from B, B should also be able to depend
on guava 16 with no conflict. That is the whole point of shading
dependencies, right?

I don't understand what you mean by "A's shaded classes to carry over to B"
here. Let's say you shaded com.google.common ->
com.mycompany.com.google.common. Then in project B, you certainly should be
able to e.g. "import com.mycompany.com.google.common" although I think that
should be a rare use case, no?

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - http://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - http://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Fri, Sep 16, 2016 at 12:21 PM, James Johansville <
james.johansvi...@gmail.com> wrote:

> Hello,
>
> I'm having trouble with shading, haven't had any successful answers at my
> SO post at
> http://stackoverflow.com/questions/39521622/getting-
> maven-transitive-shading-to-work
> .
>
> I have a problem where I have 2 Maven projects, A and B.
>
> A depends on hbase-client which in turn depends on guava 12.0 which is not
> compatible with later guava packages. B depends on A and also on guava
> 18.0, and on another package (curator-recipes) which uses guava 16.0.
>
> So the dependencies are like this:
>
> A -> hbase-client -> guava 12
> B -> A
> B -> guava 18
> B -> curator-recipes -> guava 16
>
> I can easily shade hbase-client within A's pom.xml and that works fine, but
> I'm having trouble figuring out how to get that to work within B's pom.xml.
> I want A's shaded classes to carry over to B. How do I do that?
>


Help with transitive shading

2016-09-16 Thread James Johansville
Hello,

I'm having trouble with shading, haven't had any successful answers at my
SO post at
http://stackoverflow.com/questions/39521622/getting-maven-transitive-shading-to-work
.

I have a problem where I have 2 Maven projects, A and B.

A depends on hbase-client which in turn depends on guava 12.0 which is not
compatible with later guava packages. B depends on A and also on guava
18.0, and on another package (curator-recipes) which uses guava 16.0.

So the dependencies are like this:

A -> hbase-client -> guava 12
B -> A
B -> guava 18
B -> curator-recipes -> guava 16

I can easily shade hbase-client within A's pom.xml and that works fine, but
I'm having trouble figuring out how to get that to work within B's pom.xml.
I want A's shaded classes to carry over to B. How do I do that?