如果我将 GWT 的开发模式与 Eclipse 结合使用,我在 IDE 中所做的更改将在刷新后立即反映在浏览器中。但是,使用 maven 插件 构建时,我似乎无法获得相同的结果。这可能吗?
这是我尝试过的:
- 运行 gwt:run,进行更改并将其保存在 Eclipse 中,刷新浏览器。
- 与上面相同,但单击 GWT 开发模式控制台上的“重新启动服务器”按钮。
- 告诉 Eclipse 我的项目是 GWT 项目并配置 Web 应用程序,但它无法列出任何入口点模块供我选择。
- 'webAppCreator -templates maven com.xx.WebApp' - 仅创建一个 pom,没有项目(?)。
唯一的选择似乎是:停止控制台、gwt:compile、gwt:run。这个周期每次都需要几分钟。
关于如何实现这一目标,或者是否可能,有什么想法吗?无法做到这一点对于我们采用 GWT 来说确实是一个阻碍,因为我们无法废弃 Maven。
蒂亚,罗伊
If I use GWT's Development Mode with Eclipse, changes that I make in the IDE are immediately reflected in my browser upon refresh. However, I can't seem to get the same result when using the maven plugin to build. Is this possible?
Here's what I've tried:
- Running gwt:run, making a change and saving it in Eclipse, refreshing the browser.
- Same as above but clicked the 'restart server' button on the GWT Development Mode console.
- Telling Eclipse that my project is a GWT project and configuring a Web Application, but it fails to list any Entry Point Modules for me to choose from.
- 'webAppCreator -templates maven com.xx.WebApp' - creates just a pom, no project (?).
The only option seems to be: stop the console, gwt:compile, gwt:run. This cycle takes minutes each time..
Any ideas on how to achieve this, or if it's even possible? Not being able to do this is really a show stopper for us adopting GWT, since we can't scrap maven.
TIA, Roy
发布评论
评论(1)
这个问题的真正答案来自 Thomas Broyer 的评论,但我想详细说明我采取的所有步骤以供将来参考:
使用 Maven:
使用 Eclipse:
准备就绪!
The real answer to this question came from Thomas Broyer's comment, but I wanted to spell out all of the steps that I took for future reference:
With Maven:
With Eclipse:
Ready to go!