I’ve got a project which uses GWT.
I use maven to manage dependencies, so gwt is automatically added.
I have several junit tests that run correctly when I right click on my test folder and launch as Junit test.
Now, I transform my project into gwt project using the google plugin eclipse (right click, properties, enable gwt).
When I do it, it automatically add gwt into build path (it is normally not needed because I’ve already got it in my maven dependencies, but gpe seems to need it).
I rerun my junit tests (using eclipse) and a NoSuchMethodError (and I’m sure that the incriminated method exists) comes with a lot of tests.
But if I run my tests using maven (mvn test), all tests success !
I use GWT 2.3.0, Junit 4.8.2, Eclipse Indigo
Why adding gwt in my classpath (via gpe) can cause my junit tests to failed (only in eclipse junit runner) ? And how to fix it ?
Ok I found the solution :
Run configuration > my junit config > classpath
here, I up maven dependencies before my project folder.
After that, all runs like a charm.