On Wed, Feb 4, 2009 at 1:54 PM, Matt Raible <[email protected]> wrote: > Moving up the gwtcoverage-1.4.61.jar seems to help a bit. However, now > I get the following error: > > [ERROR] Failure to load module 'com.mycompany.myapp.Application.JUnit' > java.lang.UnsupportedClassVersionError: Bad version number in .class file > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:675) > at > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) > at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) > at java.net.URLClassLoader.access$100(URLClassLoader.java:56) > at java.net.URLClassLoader$1.run(URLClassLoader.java:195) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:316) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:374) > at > com.google.gwt.dev.shell.mac.BrowserWidgetSaf$ExternalObject.gwtOnLoad(BrowserWidgetSaf.java:76) > at > com.google.gwt.dev.shell.mac.BrowserWidgetSaf$GwtOnLoad.invoke(BrowserWidgetSaf.java:155) > at org.eclipse.swt.internal.carbon.OS.ReceiveNextEvent(Native Method) > at org.eclipse.swt.widgets.Display.sleep(Display.java:3801) > > I'm using Java 1.5.0_16. Was this JAR compiled with 1.6? > > I also tried using the emma-maven-plugin by installing the emma.jar > and gwtcoverage.jar as Maven dependencies and referencing them in my > pom.xml: > > <dependency> > <groupId>com.mycompany.gwt</groupId> > <artifactId>gwtcoverage</artifactId> > <version>1.4.61</version> > </dependency> > <dependency> > <groupId>com.mycompany.emma</groupId> > <artifactId>emma</artifactId> > <version>2.0.5312</version> > </dependency> > > However, code coverage #s seem to stay the same regardless. Next I'll > try adding them as plugin dependencies rather than as project > dependencies.
Looking at the following page, it appears that Emma will only work with tests run by the surefire-plugin. http://mojo.codehaus.org/emma-maven-plugin/usage.html In my experience, tests that extend GWTTestCase can't be run by surefire, only by the GWT Plugin. Is this true? Thanks, > Matt > > On Wed, Feb 4, 2009 at 1:20 PM, Matt Raible <[email protected]> wrote: >> I will try the maven-emma-plugin next. I just tried to add >> gwtcoverage-1.4.61.jar to my build path in Eclipse and run Coverage >> using the EclEmma plugin. I get the attached error. >> >> Any ideas? >> >> Thanks, >> >> Matt >> >> On Wed, Feb 4, 2009 at 6:53 AM, Charlie Collins >> <[email protected]> wrote: >>> >>> I haven't used that patch, so I am not sure. >>> >>> Nevertheless, if you just put that jar (the patched emma) in your >>> classpath (as your dep) then it should work (and will fix what that >>> patch addresses, merged reports exception). >>> >>> To use code coverage at all with GWT 1.5.3 (or less) you need to patch >>> GWT itself though, which is different than this patch of emma. (See >>> the previous note with the issue report.) >>> >>> On Feb 3, 3:38 pm, Matt Raible <[email protected]> wrote: >>>> How would I go about integrating this patch with Maven (and the emma- >>>> maven-plugin)? I can get the JAR >>>> fromhttp://code.google.com/p/google-web-toolkit/source/browse/#svn/tools/.... >>>> Should I just use the ant-run plugin? >>>> >>>> Thanks, >>>> >>>> Matt >>>> >>>> On Jan 30, 11:07 am, Charlie Collins <[email protected]> >>>> wrote: >>>> >>>> > I should have also noted there (but you can see it in the issue and >>>> > the GWT docs), that even once you patch you don't get the ease of >>>> > choosing a coverage tool and the regular Maven way for reports, etc - >>>> > you have to use Emma. >>>> >>>> > I have successfully used Emma for quite some time, with GWT and Maven >>>> > via GWT-Maven, but it's not for the faint of heart (patch, patch, >>>> > etc). >>>> >>>> > GWT 1.6 should help with make this a lot easier, but it is my >>>> > understanding it will still be Emma only. (Cobertura won't work - has >>>> > to do with what code actually gets run during GWTTestCase tests, and >>>> > the way the classpath is constructed - even instrumenting classloaders >>>> > don't have real access, like I said, long story.) >>>> >>>> > On Jan 29, 7:00 pm, Matt Raible <[email protected]> wrote: >>>> >>>> > > I've added the cobertura-maven-plugin[1] to my project and can >>>> > > successfully generate code coverage reports for my JUnit tests. >>>> >>>> > > However, it doesn't pick up classes that extend from GWTTestCase. Is >>>> > > it possible to use the cobertura-maven-plugin for these classes and >>>> > > the gwt-maven plugin? >>>> >>>> > > Thanks, >>>> >>>> > > Matt >>>> >>>> > > [1]http://mojo.codehaus.org/cobertura-maven-plugin/ >>> >>> >>> >> >> >> >> -- >> http://raibledesigns.com >> > > > > -- > http://raibledesigns.com > -- http://raibledesigns.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "gwt-maven" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/gwt-maven?hl=en -~----------~----~----~----~------~----~------~--~---
