Re: is it legal to shade "gson" packages in Maven?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: is it legal to shade "gson" packages in Maven?

Tibor Digana
I want to use JSON because the data structures can be better transferred
over a channel, easier extend and the current algorithm can be removed.
The jackson is actually 3 libraries and very big to shade (few megabytes).
The MJson library is very old without long support.
Here the GSON library is only one, still supported by Google and it is
compiled with javac 1.6.

Of course I should not use the libraries directly on the classpath.
Everybody knows that the conflicts can be nicely avoided by shaing the Java
packages of external libraries.
T

On Sun, Feb 23, 2020 at 10:21 AM Enrico Olivelli <[hidden email]>
wrote:

> Tibor,
> can you please explain better your intent ?
> Is it about shading it into surefire booter ?
>
> Enrico
>
> Il giorno dom 23 feb 2020 alle ore 08:43 Tibor Digana
> <[hidden email]> ha scritto:
> >
> >  I want to ask you if it is still legal to shade packages in gson
> library.
> > Although it contains the Apache 2.0 license but it contains Copyright (C)
> > 2010 Google Inc.  as well, see:
> >
> https://github.com/google/gson/blob/master/gson/src/main/java/com/google/gson/stream/JsonReader.java
> >
> > --
> > Cheers
> > Tibor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: is it legal to shade "gson" packages in Maven?

Vladimir Sitnikov
>Why not using XML and built in java support?

It is no longer built-in:
https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html#JDK-8190378

Vladimir
Reply | Threaded
Open this post in threaded view
|

Re: is it legal to shade "gson" packages in Maven?

Elliotte Rusty Harold
On Sun, Feb 23, 2020 at 10:21 AM Tibor Digana <[hidden email]> wrote:
>
> Alright! There is no question about yes or no to shade. The right answer is
> yes.
> We always do it and we have reason for that for 13 years.
> Why? Because of the gson project may risk the conflicts with surefire JVM
> and surefire transitive dependencies.
> The same reason to shade Maven Shared Utils, and many other artifacts.
>

Sorry, I don't buy it. I noticed the shading of maven shared utils
today too, and that also strikes me as misguided and unnecessary.

Maybe there's a reason for shading this dependency (though it's yet to
be demonstrated here) but I suspect the pot roast principle might be
in play here:

https://www.psychologytoday.com/us/blog/thinking-makes-it-so/201402/the-pot-roast-principle

--
Elliotte Rusty Harold
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]