gwt-maven-archetype modular-webapp giving 404 Error

151 views
Skip to first unread message

Kathiravan Tamilvanan

unread,
Jun 26, 2013, 5:14:53 PM6/26/13
to google-we...@googlegroups.com
I have just used the gwt-maven-archetypes to create a modular-webapp. When i followed the steps to run the application. Everything seems to be successfully running but the page throws a 404 error on http://localhost:8080 when launched.

I have not changed anything from the archetypes output.

Appreciate your help !

Thomas Broyer

unread,
Jun 26, 2013, 6:19:51 PM6/26/13
to google-we...@googlegroups.com
What parameters did you use when generating the archetype? (groupId, archetypeId, package, module name, short module name)
As an alternative, zip your project and share it somewhere (Google Drive, DropBox, or maybe just an attachment here)

Also, what commands do you use to "run" it? Do they appear to run correctly?

Final note: if you want to run in DevMode, the URL should be http://localhost:8080/?gwt.codesvr=127.0.0.1:9997 (you can just click the "open in default browser" or "copy URL to clipboard" buttons in the DevMode window that opens when you run the "gwt:run" goal), but in any case, it shouldn't result in a 404, so that's not the issue there.

Kathiravan Tamilvanan

unread,
Jun 27, 2013, 7:35:36 PM6/27/13
to google-we...@googlegroups.com
The error was because of the port being used by another application. This all works beautifully with multiple shared components with web , client and service layer modules. 

What is right way to add third party gwt modules in the client code. Will it be more like the shared module with classifier sources dependency.

Thanks Thomas for the wonderful plugin.

Thomas Broyer

unread,
Jun 28, 2013, 4:02:30 AM6/28/13
to google-we...@googlegroups.com


On Friday, June 28, 2013 1:35:36 AM UTC+2, Kathiravan Tamilvanan wrote:
The error was because of the port being used by another application. This all works beautifully with multiple shared components with web , client and service layer modules. 

What is right way to add third party gwt modules in the client code. Will it be more like the shared module with classifier sources dependency.

It depends whether they are "client only" modules or "shared" modules. For "client-only" I'd rather package the sources in the JAR.
For share modules that you want to reuse and/or that have themselves dependencies on other shared modules, I'd actually do a "client only" module (see the image in https://plus.google.com/113945685385052458154/posts/RDrK7ukVFqJ) to makes things easier for users of the module(s).

Thanks Thomas for the wonderful plugin.

If you're talking about the CodeHaus' gwt-maven-plugin, I didn't do much besides releasing it. Most of the work has been done by others (Nicolas De Loof, Olivier Lamy, etc.)
The new gwt-maven-plugin (currently in net.ltgt.gwt.maven in alpha) is far from done but should make things easier for everyone. Once I have a gwt:run goal ready (and ability to fork the compiler in another process), I'll update the archetypes to use it instead of the CodeHaus' gwt-maven-plugin.

Kathiravan Tamilvanan

unread,
Jun 28, 2013, 2:19:23 PM6/28/13
to google-we...@googlegroups.com
Hmm...I am little confused about the client-only modules. I have few GWT Client modules (mainly UI widgets) and i want to include them in my project. And if i do source package, i dont have to inherit the module in the gwt.xml, Am i right?

Thomas Broyer

unread,
Jun 30, 2013, 3:05:34 PM6/30/13
to google-we...@googlegroups.com

On Friday, June 28, 2013 8:19:23 PM UTC+2, Kathiravan Tamilvanan wrote:
Hmm...I am little confused about the client-only modules. I have few GWT Client modules (mainly UI widgets) and i want to include them in my project. And if i do source package, i dont have to inherit the module in the gwt.xml, Am i right?

Here's how it goes:
The gwt-lib and gwt-app packagings call gwt:generate-module in the generate-resources phase. gwt:generate-module picks all META-INF/gwt/mainModule files which should contain module names, generates an <inherit/> for each of them and merges them with whatever is in src/main/Module.gwt.xml to generate the final module whose name is given in the plugin's configuration.
gwt-lib also calls gwt:generate-module-metadata in the generate-resources phase to generate the META-INF/gwt/mainModule file.
gwt-lib also indeed packages the sources within the JAR; it's only meant for client-only code.
Reply all
Reply to author
Forward
0 new messages