Problem with running Maven GWT application in Eclipse
I'm trying to create a GWT project through WebAppCreator enabled Maven2.
Project creation steps:
webAppCreator -noant -maven -XnoEclipse -out MyApp com.example.MyApp
[WARN] Server class 'com.example.server.GreetingServiceImpl' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/home/redfox/workspace/java/redfox/MyApp/target/www/WEB-INF/classes/' to the web app classpath for this session
[WARN] Server class 'com.google.gwt.user.client.rpc.RemoteService' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/home/redfox/.m2/repository/com/google/gwt/gwt-servlet/2.3.0/gwt-servlet-2.3.0.jar' to the web app classpath for this session
And when i try to load page from URL (http://127.0.0.1:8888/MyApp.html?gwt.codesvr=127.0.0.1:9997) i see 404 error. In logs i don't see any errors. How can i run this default application? Also i have another question: if this problev will be solved, how can i run this application in web mode (not in development mode) for using links like "http://127.0.0.1:8888" whithout param gwt.codesvr?
PS Sorry for my bad English.
I understand your frustration, trust me, I recently went through exactly the same issue you having now.
As Eugene indicated, follow his instructions, but...
On the Select an Archetype
choose version 2.3.0-1
(Others may work but this one works for me)
Generate your sample app using theat Archtype version. Do a mvn gwt:run, you will see this screen (If all goes well) Click on "Launch Default Browser".
Good luck. Cheers PB
I know this question is two years old. But i just had the same issue and now figured out how to fix it.
When eclipse doesn't ask you at the first launch for your "WAR" directory, you can also set it manually:
In eclipse go to "Run" -> "Debug Configuration...". Select your "Web Application" -> Select the "Arguments"-Tab and add the parameter eg "-war C:YourProjectPathtargetYourProject-1.0-SNAPSHOT". Provide the full path here pointing to your target, generated by maven.
Hope that helps someone solving this issue faster :)
I know this is old, but here is my latest approach (as also answered here)
I can't speak for the webAppCreator because I haven't used it, but I have had good luck creating the Maven projects in Eclipse using the gwt-maven-plugin from codehause.
Creating a Maven GWT Project Directy in Eclipse
Open the new project wizard in Eclipse and filter on Maven Project.
Select the Maven Project and click next.
Enter the project location of your preference and click next.
Enter "gwt-" into the archetype filter and select the gwt-maven-plugin from codehaus. Click Next.
Enter your maven project details and a module value, then click Finish.
This will create a maven - gwt project for you in Eclipse. This comes with a sample application that you can use to make sure you can launch the application correctly.
Running the Application Command Line
This should get you up and running. If you used the 2.7.0 gwt-maven-plugin this should run the application in super dev mode by default.
Run the application in Eclipse
Missing required argument 'module[s]'
. To fix this open up your run configuration (should have been auto created) and in the arguments tab add the package qualified name for your module at the end of the arguments, eg com.mycompany.abc.GwtSampleModule. Do not add the ".gwt.xml" prefix. The application should now be configured for Launch in Eclipse using this run configuration. My verified environment is:
上一篇: 在eclipse中自动化GWT构建