PSA: GWT starting unbundling dependencies from gwt-dev, could break your build

354 views
Skip to first unread message

Thomas Broyer

unread,
Oct 12, 2014, 4:36:35 AM10/12/14
to codehaus-mojo-gwt-...@googlegroups.com
Hi all,

If you're using 2.7.0-SNAPSHOT, your build might start failing as of today as we started unbundling dependencies from gwt-dev.

java.lang.NoClassDefFoundError: org/objectweb/asm/ClassVisitor

If you get this error, be sure to also update your gwt-maven-plugin to the latest 2.7.0-SNAPSHOT too.

If that doesn't work, add gwt-dev or (better) gwt-codeserver as a project dependency (and report the problem here). This is likely to become the preferred way to use GWT in the future, and the gwt-maven-plugin might stop automatically adding GWT deps to the classpath in gwt:compile or gwt:run in a future version (probably not 2.7 though): as we'll unbundle more dependencies from gwt-dev (and gwt-user), you might want to gain control over those dependencies (e.g. using a newer version of Guava, or ASM, etc.) and this is not possible with plugin dependencies as it's done today within the gwt-maven-plugin.

Also noteworthy: that same change also turned com.google.gwt:gwt into a BOM (bill of material); that means that instead of including the <version> in all your GWT dependencies you can now declare com.google.gwt:gwt into your dependencyManagement section with <scope>import</scope>. As a bonus, it should ensure transitive dependencies to GWT will all use the same version, so you'll have fewer risks of conflicts.

I'll soon update the GWT samples, WebAppCreator templates and various archetypes to use those new "best practices".

Ramon Salla

unread,
Oct 12, 2014, 2:44:24 PM10/12/14
to codehaus-mojo-gwt-...@googlegroups.com
hi, latest update break my build.  

I added gwt-serv *and* gwt-codeserv 

the ClassNotFoundException is still there...

any ideas?

Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.ClassVisitor
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 21 more

El diumenge 12 d’octubre de 2014 10:36:35 UTC+2, Thomas Broyer va escriure:

Thomas Broyer

unread,
Oct 12, 2014, 3:01:24 PM10/12/14
to codehaus-mojo-gwt-...@googlegroups.com


On Sunday, October 12, 2014 8:44:24 PM UTC+2, Ramon Salla wrote:
hi, latest update break my build.  

I added gwt-serv *and* gwt-codeserv 

the ClassNotFoundException is still there...

any ideas?

There's actually a bug in the parent POM: https://gwt-review.googlesource.com/9642
Reply all
Reply to author
Forward
0 new messages