Jeff,

you should read
http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/testing.html

It suggests to name your GWT testcases "GwtTest*.java" and not
"*Test.java", so
surefire does not try to execute these tests.

Hope this helps,
Holger

On 11 Sep., 00:10, Jeff Bowman <[EMAIL PROTECTED]> wrote:
> I'm totally without a clue at this point.
>
> I have checked out the simplesample from svn and moved the .gwt.xml
> file to src/main/resources/com/totsp/sample and run mvn test and
> presto it worked.
>
> So I created a brand new application as a demo to see if I could make
> it work in the same way, so I created the maven directories some code
> and then used the plugin doc to create a pom.xml. That failed. It
> couldn't run the mergewebxml goal. So I copied the pom.xml from the
> simplesample and it failed to find the .gwt.xml file. Then I noticed I
> was returning the wrong name for the module in the test and changed it
> to remove the .client portion of the package. So, now I no longer get
> the error about it not finding the .gwt.xml file. Instead I get this
> error:
>
> Running us.bowmansarrow.client.ApplicationTest
> Loading module 'us.bowmansarrow.Application.JUnit'
>    Translatable source found in...
>       [WARN] No source path entries; expect subsequent failures
> com.google.gwt.core.ext.typeinfo.NotFoundException: java.lang.Object
>         at
> com.google.gwt.core.ext.typeinfo.TypeOracle.refresh(TypeOracle.java:
> 544)
>         at
> com.google.gwt.dev.javac.TypeOracleMediator.refresh(TypeOracleMediator.java:
> 394)
>         at
> com.google.gwt.dev.javac.CompilationState.compile(CompilationState.java:
> 137)
>         at
> com.google.gwt.dev.cfg.ModuleDef.updateTypeOracle(ModuleDef.java:477)
>         at
> com.google.gwt.dev.cfg.ModuleDef.getTypeOracle(ModuleDef.java:324)
>         at
> com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:
> 168)
>         at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
> 628)
>         at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:
> 150)
>         at
> com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:219)
>         at junit.framework.TestCase.runBare(TestCase.java:
> 130)
>         at junit.framework.TestResult$1.protect(TestResult.java:
> 110)
>         at junit.framework.TestResult.runProtected(TestResult.java:
> 128)
>         at junit.framework.TestResult.run(TestResult.java:
> 113)
>         at junit.framework.TestCase.run(TestCase.java:
> 120)
>         at
> com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:132)
>         at junit.framework.TestSuite.runTest(TestSuite.java:
> 228)
>         at junit.framework.TestSuite.run(TestSuite.java:
> 223)
>         at
> org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:
> 35)
>         at
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
> 62)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:
> 140)
>         at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:
> 127)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:
> 177)
>         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:
> 585)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:
> 338)
>         at
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:
> 997)
> [ERROR] Unable to find type 'java.lang.Object'
>    [ERROR] Hint: Check that your module inherits
> 'com.google.gwt.core.Core' either directly or indirectly (most often
> by inheriting module 'com.google.gwt.user.User')
>
> I have even gone back and added a resources section to my pom.xml file
> and get the same error message. I also tried adding a <public
> path="src/main/resources"/> to my .gwt.xml file. Same error.
>
> I'm happy to zip up this application as it is and email if someone
> could take a look and see where I've missed it and then let me know
> what the fix might be. I've read as much as I can find but I haven't
> been able to figure this one out. Help is greatly appreciated. (the
> zip file is at:http://bowmansarrow.us/Application.zip)
>
> Thanks!!
>
> Jeff
>
> PS, I'll be more than happy to read any further docs
>
> On Sep 9, 3:55 pm, Charlie Collins <[EMAIL PROTECTED]> wrote:
>
> > And, just to spam this thread one more time, if you are running "mvn
> > test" as your above post notes, then I don't know what's up.  Have a
> > look at the test script and see what's missing (target/gwtTest).  This
> > should work just fine as the resources:resources goal does run as a
> > pre-requisite to test. (And in all my local experiments it works just
> > fine too, like as noted above with simplesample.)
>
> > On Sep 9, 4:50 pm, Charlie Collins <[EMAIL PROTECTED]> wrote:
>
> > > Ok, let me revise my response, I just went and tried this an it works
> > > fine for the simplesample project (http://gwt-maven.googlecode.com/svn/
> > > trunk/maven-googlewebtoolkit2-plugin/simplesample/) if I delete the
> > > module file from src/main/java and move it to src/main/resources.
>
> > > The key is that you need to run "mvn test" and NOT just gwt:test.
> > > gwt:test is not intended to be run standalone, it is just one part of
> > > the test phase.  It happens during the test phase.  If run compile and
> > > so on first, and all the resources get copied over, then you can run
> > > gwt:test on it's own and it will work, but it only works because
> > > prerequisites are in place.  To be safe, just run mvn test, and don't
> > > run gwt:test directly.
>
> > > On Sep 9, 4:42 pm, Charlie Collins <[EMAIL PROTECTED]> wrote:
>
> > > > I replied to this a minute ago, but guess it didn't work or hasn't
> > > > shown up, strange.
>
> > > > Anyway - three options
>
> > > > 1. configure the resources plugin to include src/main/resources during
> > > > the test phase (by default I don't think it does, I think it just
> > > > includes src/test/resources - no positive though - see the resources
> > > > plugin docs).
>
> > > > 2. move the module file to src/main/java
>
> > > > 3.  make a test module file and put it in src/test/resources/org/
> > > > gwtbook
>
> > > > On Sep 9, 3:37 pm, Jeff Bowman <[EMAIL PROTECTED]> wrote:
>
> > > > > I'm getting the below failure when running tests (mvn test). It seems
> > > > > to not be able to find my .gwt.xml file, which I have located in src/
> > > > > main/resources/org/gwtbook.  Where should I put that file?
>
> > > > > Running org.gwtbook.client.DashboardTest
> > > > > Loading module 'org.gwtbook.client.Dashboard.JUnit'
> > > > >    Loading inherited module 'org.gwtbook.client.Dashboard'
> > > > >       [ERROR] Unable to find 'org/gwtbook/client/Dashboard.gwt.xml' on
> > > > > your classpath; could be a typo, or maybe you forgot to include a
> > > > > classpath entry for
> > > > > source?
> > > > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.507
> > > > > sec <<< FAILURE!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to