GWTTestCase run by surefire 2.9

86 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Andreas Horst

ungelesen,
28.07.2011, 04:03:0028.07.11
an codehaus-mojo-gwt-...@googlegroups.com, google-we...@googlegroups.com
Hi All

Is anybody successfully running GWTTestCase (2.3) using the surefire plugin version 2.9? If so could you share your surefire configuration?


I just recently switched to latest version of surefire for staying up to date and now have problems running my GWTTestCases with it. My surefire configuration is derived from here:

<configuration>
     
<useSystemClassLoader>false</useSystemClassLoader>
     
<additionalClasspathElements>
       
<additionalClasspathElement>${basedir}/src/main/java</additionalClasspathElement>
       
<additionalClasspathElement>${basedir}/src/test/java</additionalClasspathElement>
     
</additionalClasspathElements>
 
</configuration>

and used to work fine with older surefire versions. Switching back to older versions also works but now I wonder what breaks it exactly.

The error message is:

Loading inherited module 'de.my.module.Module'
   [ERROR] Unable to find 'de/my/module/Module.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

Which actually seems to be pretty nonsense since
a) it works with older versions
b) the module is definitely on the classpath (see surefire configuration: .gwt.xml is in src/main/java; and a))

Basic setup: Eclipse EE Indigo on Win7(64) with m2e 1.0.0.20110607, Maven 3.0.3, Sun JDK 1.6.0_24

Cheers

Andreas

Andreas Horst

ungelesen,
28.07.2011, 04:12:1528.07.11
an codehaus-mojo-gwt-...@googlegroups.com, google-we...@googlegroups.com
Forgot the stack trace:

com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.cfg.ModuleDefLoader.nestedLoad(ModuleDefLoader.java:262)
at com.google.gwt.dev.cfg.ModuleDefLoader$2.load(ModuleDefLoader.java:210)
at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:308)
at com.google.gwt.dev.cfg.ModuleDefLoader.createSyntheticModule(ModuleDefLoader.java:102)
at com.google.gwt.junit.CompileStrategy.maybeCompileModuleImpl2(CompileStrategy.java:165)
at com.google.gwt.junit.CompileStrategy.maybeCompileModuleImpl(CompileStrategy.java:112)
at com.google.gwt.junit.SimpleCompileStrategy.maybeCompileModule(SimpleCompileStrategy.java:36)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1340)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1309)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:650)
at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:441)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:296)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:98)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:117)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)

2011/7/28 Andreas Horst <horst.a...@googlemail.com>

Andreas Horst

ungelesen,
28.07.2011, 04:29:3628.07.11
an codehaus-mojo-gwt-...@googlegroups.com, google-we...@googlegroups.com
Hi Nicolas

I'm not using the gwt-maven-plugin for this project since the project does not produce GWT compiler output. It's a reusable GWT-based API and only builds jars to use in concrete GWT projects which of course then use the gwt-maven-plugin.

I hence only need "normal" compilation and test execution besides the use of some GWTTestCases. Would you suggest using the gwt-maven-plugin for this even though the GWT compiler itself will not be used?

Thanks

Andreas

2011/7/28 nicolas de loof <nicolas...@gmail.com>
Why don't you use gwt:test goal for that ? It has been designed to mimic surefire but don't requires such tricky configuration

2011/7/28 Andreas Horst <horst.a...@googlemail.com>

--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Codehaus Mojo gwt-maven-plugin Users" group.
To post to this group, send email to codehaus-mojo-gwt-...@googlegroups.com.
To unsubscribe from this group, send email to codehaus-mojo-gwt-maven-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/codehaus-mojo-gwt-maven-plugin-users?hl=en.

Andreas Horst

ungelesen,
28.07.2011, 04:53:4228.07.11
an codehaus-mojo-gwt-...@googlegroups.com, google-we...@googlegroups.com
Thanks Nicolas

I will try it using the gwt-maven-plugin test mojo.

Let me add another question please:

Is anybody using this particular setup for building GWT module jars and successfully using the gwt-maven-plugin test mojo for obtaining coverage? Actually the reason for using surefire for GWTTestCase was for obtaining coverage for both pojo Unit and GWT tests to display in Sonar. We used emma which seemed to be the only one working with GWT tests at that moment.

Andreas

2011/7/28 nicolas de loof <nicolas...@gmail.com>
Sure, compile mojo is only one of the available mojos, you can use only gwt:test to run tests, and gwt:resources to package the xml and .java files with your gwt module

Colin Alworth

ungelesen,
29.09.2011, 00:47:2229.09.11
an codehaus-mojo-gwt-...@googlegroups.com, google-we...@googlegroups.com
I've gotten emma to work with gwt:test, but only with maven 2 - I havent tracked down the specifics of why it didn't work with 3. Main piece in doing this was to stop surefire from running, and make sure that gwt tests run normally during a build. After that, the only step was to run the emma:emma goal - nothing declared in the pom specifically for emma.

Tested just now with maven 2.2.1.
Allen antworten
Antwort an Autor
Weiterleiten
0 neue Nachrichten