tags:

views:

78

answers:

2

Hi,

One of the best features of gwt is the edit/save/refresh development cycle. This has worked great when working with only one module. But what about when the application is broken down into multiple modules?

More specifically, we've moved towards a structure where we have a main ui module with an entry point and multiple additional modules which "hook" into it. So the main ui module inherits these other modules (libraries). The GWT Shell is always launched with the main ui, but it doesn't reflect the other module changes on refresh. We have to rebuild and relaunch the shell to see it.

As gwt is being used to build larger and larger apps, the architecture will tend towards breaking it down into smaller modules rather than one monolithic app. Any suggestions to overcome this limitation?

Thanks much, Mohnish

+1  A: 

We do something very similar in terms of using multiple modules in one application. In the command to start the GWT shell we include every module in the argument list and then we are able to see changes to any module with a refresh.

Joel
Thanks for your reply. Could you expand a bit on what you meant by "include every module in the GWT Shell argument list"? We use maven to build/run our app. The modules are already part of the classpath. Here's what gets executed with trace on for mvn gwt:debug:
mohn3310
java -Xmx512m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y -classpath "<project>\ui\war\WEB-INF\classes";"<project>\ui\src\main\java";"<project>\ui\src\main\resources";"<gwt-servlet>.jar";"<gwt-user>.jar";"<project_module1>.jar";"<project_module2>.jar";"<gwt-dev-windows>.jar" com.google.gwt.dev.HostedMode -war "<project>\ui\war" -gen "<project>\ui\target\.generated" -logLevel INFO -style OBF -port 8888 -startupUrl"/" <project>.ui.UI
mohn3310
Where you have <project>.ui.UI, you want to include all the modules, a space-separated list of them. I don't use maven but the command to start the hosted mode browser for us looks something like "java com.google.gwt.dev.HostedMode -startupUrl http://localhost:8080/ com.example.module1.Module1 com.example.module2.Module2 com.example.module3.Module3"
Joel
Good to know. Appreciate your help.
mohn3310
A: 

We're using the maven gwt plugin to build our multi-module project. Turns out they have a solution for this posted on their site which works great: http://mojo.codehaus.org/gwt-maven-plugin/user-guide/productivity.html.

mohn3310