How do I run Google Web Toolkit applications from the command line?
At the moment I'm running the demo StockWatcher in Eclipse. This uses the embedded servlet container which is fine for my purposes. The only change I would like to make is running from the command line instead of inside Eclipse. Does anyone know what command I use and what classpath this requires?
Ed开发者_StackOverflow社区it - I have not used maven I have created the project purely using eclipse and gwt plugin
If you used the webAppCreator wizard (I see that you used the Eclipse plugin, but maybe both of them used the same code internally), you should have an ant script (build.xml
) generated for you. With it you can run the GWT app via targets so:
ant hosted
- run hosted mode (or Development mode, I'm looking at a fairly old ant script)ant gwtc
- compile to JSant war
,ant build
, etc.
See what's in that file (build.xml
) to get a better understanding of what is available and what you can do.
Update: see here for documentation on webAppCreator and available ant targets.
With the maven jetty plugin you can run your application with jetty from command line. (You first have to compile & create war with maven gwt plugin I think)
mvn jetty:run
maven gwt plugin
maven jetty plugin
Did you use Maven for this project? If that, then you can run it as mvn gwt:run
from command line
精彩评论