Thursday, May 5, 2016

Re: Specify earlier dated version of requestfactory-server-2.8.0-SNAPSHOT with Maven



On Wednesday, May 4, 2016 at 8:46:03 PM UTC+2, Seth wrote:

Hi all,


After some jar hell, I figured out that the requestfactory-server-2.8.0-SNAPSHOT after March 20, 2016 (or so) seems to be including some Gson classes (and it doesn't seem to use a dependency). These Gson classes are causing some classpath problems with another dependency that depends on Gson 2.2.4 release resulting in some not-so-nice NoClassDefFound exceptions.


Thanks for the report, I'll get it fixed.
FWIW, it was introduced on April 6th: https://github.com/gwtproject/gwt/commit/21e557ee56e257bc4af1b1b637f5ba5d775a56dd
 

The only remedy I found was to replace the requestfactory-server-2.8.0-SNAPSHOT maven includes with a version from March 20, 2016 (or earlier). 


Does anyone know how to specify a more detailed version for the requestfactory-server-2.8.0-SNAPSHOT  so that Maven will just build with the snapshot version from March 20, 2016?


You should be able to specify a timestamped version, e.g. 2.8.0-20160502.055217-237 for May, 5th build; but beware that older snapshots are regularly deleted.
(see https://oss.sonatype.org/content/repositories/google-snapshots/com/google/web/bindery/requestfactory-server/2.8.0-SNAPSHOT/ for available versions; unfortunately, while the history might look big, only signatures are kept –for some reason, probably a bug in the cleanup task on Sonatype's side– for older snapshots, and you won't find builds as old as the one you'd like)
 

I understand that SNAPSHOT means latest and there's a beta1, but the 2.8 beta1 is almost 6 months old now. And it seems as though it will be much harder to get an actual Gson dependency for requestfactory-server (or to resolve the class duplication) in the short term.


Your best short-term bets are to either:
  • build a version yourself that you deploy into your own repo, with a non-snapshot version (e.g. 2.8.0-seth-20160405-g5d64514)
  • pre-process the snapshot JAR to remove the offending classes: use a Maven module that depends on the snapshot jar (with scope=provided) and repacks it without the offending classes (might be possible and easy with the maven-shade-plugin); then have your app depends on that module instead of the snapshot.
 


Many thanks in advance,


-Seth

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment