No worries. I'm note sure that you even need the runTarget. AFAIK JUnitShell should use the auto-generated host page when it runs anyway.
On Wed, Mar 11, 2009 at 8:31 PM, Matt Raible <[email protected]> wrote: > > I got it to work!! > > Here's a brief rundown of how to do it: > > 1. Create a NoOpEntryPoint.gwt.xml in src/test/java > 2. Create a NoOpEntryPoint.java in src/test/java > 3. Reference this class in compileTargets and reference an HTML file > that doesn't exist in runTarget. > > Everything should work. I'm not sure if the package structuring had an > effect, but I can change things and re-run to find out. > > Thanks for all your help and patience Robert. > > Matt > > On Wed, Mar 11, 2009 at 5:11 PM, Robert kebernet Cooper > <[email protected]> wrote: >> >> Edit: >> If not, com.company.app.client.NoOpEntryPoint.java >> should be com.company.app.client.client.NoOpEntryPoint.java (a >> "client" directory below the .NoOpEntryPoint.gwt.xml file. >> >> On Wed, Mar 11, 2009 at 8:11 PM, Robert kebernet Cooper >> <[email protected]> wrote: >>> Ok. First, this may just be "Translate to email error" but is is >>> com/company/app/client/Core.gwt.xml? and >>> com/company/app/client/NoOpEntryPoint? If so, those should probably >>> move up a directory. If not, com.company.app.client.NoOpEntryPoint >>> should be om.company.app.client.client.NoOpEntryPoint >>> >>> Also, make sure your GWTTestMyClass is returning >>> "com.company.app.client.NoOpEntryPoint" or whatever the corrected name >>> for the test gwt.xml file is. >>> >>> >>> >>> On Wed, Mar 11, 2009 at 7:56 PM, Matt Raible <[email protected]> wrote: >>>> >>>> I added a NoOpEntryPoint.gwt.xml to src/test/resources. Here's it's >>>> contents: >>>> >>>> <module> >>>> <inherits name="com.company.app.client.Core"/> >>>> >>>> <entry-point class="com.company.app.client.NoOpEntryPoint"/> >>>> </module> >>>> >>>> Then I added a NoOpEntryPoint.java in src/test/java: >>>> >>>> I removed the "compile" goal from the gwt-maven-plugin and now I get >>>> the following error when running tests: >>>> >>>> com.google.gwt.junit.JUnitFatalLaunchException: The test class >>>> 'com.company.app.client.widget.BulletListGwtTest' was not found in >>>> module 'com.company.app.client.NoOpEntryPoint'; no compilation unit >>>> for that type was seen >>>> at >>>> com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:193) >>>> 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 com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:132) >>>> >>>> If I add the "compile" goal back in, I get the following error: >>>> >>>> [ERROR] Module has no entry points defined >>>> [ERROR] Build failed >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [ERROR] BUILD ERROR >>>> [INFO] >>>> ------------------------------------------------------------------------ >>>> [INFO] Exception attempting to run script - compile.sh >>>> >>>> Thanks for your help. >>>> >>>> Matt >>>> >>>> >>>> On Wed, Mar 11, 2009 at 3:05 PM, Robert (kebernet) Cooper >>>> <[email protected]> wrote: >>>>> >>>>> Make src/test/resources/../Test.gwt.xml that inherits Core and has a >>>>> do nothing entry point, then declare your test cases as being part of >>>>> the Test module. >>>>> >>>>> --r(k)c >>>>> >>>>> >>>>> On Mar 11, 2009, at 5:05 PM, Matt Raible <[email protected]> wrote: >>>>> >>>>>> >>>>>> I wish I understood your instructions below, but unfortunately can't >>>>>> grock them. ;-) >>>>>> >>>>>> In my core module, I have src/main/java/**/*.java and >>>>>> src/main/resources/**/Core.gwt.xml. I also have >>>>>> src/test/java/**/*.java classes that extend GWTTestCase and test >>>>>> classes in src/main/java. >>>>>> >>>>>> Are you suggesting that I split this core module into multiple >>>>>> modules? Or are you suggesting I create an EntryPoint in src/test/java >>>>>> and a src/test/resources/**/Core.gwt.xml that references that >>>>>> EntryPoint? >>>>>> >>>>>> Thanks, >>>>>> >>>>>> Matt >>>>>> >>>>>> On Mar 11, 12:49 pm, "Robert \"kebernet\" Cooper" <[email protected]> >>>>>> wrote: >>>>>>> You would need to declare a "Test" module and inherit your core >>>>>>> module. You can do this in src/test/java and src/test/resources. >>>>>>> Basically the test cases are wanting to boostrap a complete module, >>>>>>> then inject the JavaScript that results from compiling your >>>>>>> GWTTestCases into a headless (insert HostedMode platform browser) >>>>>>> instance. Just have your test cases remote "MyTestModule" as their >>>>>>> module name. >>>>>>> >>>>>>> At this point if you are just packaging a JAR with the sources for >>>>>>> the >>>>>>> main module in it, you can ignore the "compile" target on your >>>>>>> library, since the JUnitShell will use the same compiling classloader >>>>>>> as the hosted mode browser. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Wed, Mar 11, 2009 at 12:37 PM, Matt Raible <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> Is it possible to use gwt-maven to compile and (most importantly) >>>>>>>> run >>>>>>>> tests in a GWT Module? >>>>>>> >>>>>>>> I've created a module that doesn't have an entry point. The module >>>>>>>> creates a JAR and I've proven it can work in another GWT module. >>>>>>> >>>>>>>> However, I have GWT tests (that extend GWTTestCase) in my module >>>>>>>> that >>>>>>>> I want to run with the gwt-maven plugin. Unfortunately, I get the >>>>>>>> following error: >>>>>>> >>>>>>>> [ERROR] Module has no entry points defined >>>>>>>> [ERROR] Build failed >>>>>>>> [INFO] >>>>>>>> --- >>>>>>>> --- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> [ERROR] BUILD ERROR >>>>>>>> [INFO] >>>>>>>> --- >>>>>>>> --- >>>>>>>> ------------------------------------------------------------------ >>>>>>>> [INFO] Exception attempting to run script - compile.sh >>>>>>> >>>>>>>> Embedded error: compile.sh script exited abnormally with code - 1 >>>>>>> >>>>>>>> Is it possible to use the gwt-maven plugin to run tests in a >>>>>>>> module w/ >>>>>>>> o entry points? >>>>>>> >>>>>>>> Thanks, >>>>>>> >>>>>>>> Matt >>>>>>> >>>>>>> -- >>>>>>> :Robert "kebernet" Cooper >>>>>>> ::[email protected] >>>>>>> Alice's cleartext >>>>>>> Charlie is the attacker >>>>>>> Bob signs and encryptshttp://pgp.mit.edu:11371/pks/lookup? >>>>>>> op=get&search=0x9E8759F8 >>>>>> > >>>>> >>>>> > >>>>> >>>> >>>> >> >>>> >>> >>> >>> >>> -- >>> :Robert "kebernet" Cooper >>> ::[email protected] >>> Alice's cleartext >>> Charlie is the attacker >>> Bob signs and encrypts >>> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 >>> >> >> >> >> -- >> :Robert "kebernet" Cooper >> ::[email protected] >> Alice's cleartext >> Charlie is the attacker >> Bob signs and encrypts >> http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 >> >> > >> > > > > -- :Robert "kebernet" Cooper ::[email protected] Alice's cleartext Charlie is the attacker Bob signs and encrypts http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x9E8759F8 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
