On Sunday, October 20, 2013 5:14:54 PM UTC+2, Cristiano wrote:
>
> Hi All,
>
> I'm studying the gwt source code and I bumped into imports of classes 
> under packages com.google.gwt.thirdparty.* like:
>
> import com.google.gwt.thirdparty.guava.common.base.Preconditions; 
> import com.google.gwt.thirdparty.streamhtmlparser.HtmlParser; 
> import com.google.gwt.thirdparty.streamhtmlparser.HtmlParserFactory; 
> import com.google.gwt.thirdparty.streamhtmlparser.ParseException;
>
> I cannot find the above in the GWT sources, I searched into the GWT tools 
> and there they are:
>
> $ unzip -l ./lib/guava/guava-10.0.1/guava-10.0.1-rebased.jar | grep 
> Preconditions
>      5209  10-10-11 10:44   
> com/google/gwt/thirdparty/guava/common/base/Preconditions.class
>
> Can some good soul explain me the story behind these rebased dependencies?
>

For Guava and Protobuf, that was once the recommended use, to avoid 
conflicts with other versions (there was no guarantee of forward or 
backward compatibility for these libs at the time).
streamhtmlparser is an internal API of jsilver, so jsilver doesn't give any 
compat' guarantee either, and similarly for the closure compiler.
 

> More specifically, for example,
> how does the ./lib/guava/guava-10.0.1/guava-10.0.1-rebased.jar is created 
> and maintained?
>

There are README files that explain it for each lib (BTW, GWT now uses 
guava-15.0, have a look at the Ant build files; Eclipse files might not 
always be up-to-date)
Most of the time (if not all) it's done using JarJar.
 

> and why GWT can't use the original "com.google.common.base.Preconditions" 
> without shading it?
>

It could now that Guava gives compat guarantees.; and there are plans to 
migrate to a non-rebased Guava.
 

> I was trying to compile GWT with replacing all the lib in GWT tools with 
> dependencies coming from maven central repo,
>

You won't be able to do it. JDT and ICU, to mention a few, are not 
available there (or in any other Maven repo BTW)
 

> but I had to stop when I bumped into this imports as I will not find 
> "guava-10.0.1-rebased" for GWT in it.
>
> Maybe it is possible (even if it may require lot of effort) to recreate 
> these rebased dependencies with Maven Shade Plugin, and so I can put a step 
> on my build chain where these missing dependencies 
> "com.google.gwt.thirdparty" libs are built with it.
>

That was my plan when I was working on the Mavenization.

but there could be lot of reason why this could be unfeasible... 
> if I understand better the strategy, maybe I can find some idea on how to 
> deal with it...
>

How about just deploying those deps in a repo?
 

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- 
You received this message because you are subscribed to the Google Groups "GWT 
Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to