运行 带有 Maven EAR 打包 GWT 应用程序的 SuperDevMode
Running SuperDevMode with a Maven EAR packaged GWT application
我已经成功地将我的典型 GWT 2.7 和 AppEngine 堆叠应用程序从单个 Maven 模块重构为多个 - 我可以编译,运行 AppEngine 开发服务器并部署。
我需要一些关于使用 GWT mojo. Now the client and server components are split into different modules and packaged using a EAR module 配置 GWT SuperDevMode 的指导,我不确定从哪里开始。
项目布局类似于:
/app-client (GWT) - I use the GWT mojo here to compile a client WAR. I used to have everything in here.
/app-core (Shared Code) - JAR
/app-server (Default AppEngine Module) - WAR
/app-auth (Auth AppEngine Module) - WAR
/app-worker (Worker AppEngine Module) - WAR
/app-ear (EAR Package) - I use the AppEngine mojo here for deployment.
pom.xml - parent
我假设 app-ear
模块上的 GWT mojo 必须是 运行,但是如何向 运行 配置提供 app-client
源?
Mojo 的 GWT Maven 插件在 multi-module 构建中并不容易 运行 开发模式。要获得正确的类路径,您需要 运行 您的 app-client
模块中的 gwt:run
或 gwt:run-codeserver
目标(为此您需要 mvn install
您的dependencies –app-core
– and/or hack around with profiles and the build-helper-maven-plugin
; see this POM for example, 两者都需要 mvn install
来解决依赖关系,并使用build-helper-maven-plugin
这样您就可以更改共享代码而无需 mvn install
并重新启动开发模式)。
FWIW,net.ltgt.gwt.maven:gwt-maven-plugin
(免责声明:我是作者)从一开始就考虑到了 use-case;所以你实际上在父模块上 运行 gwt:devmode
或 gwt:codeserver
并告诉它哪个模块是 GWT 应用程序以及在哪里生成 *.nocache.js
.
我已经成功地将我的典型 GWT 2.7 和 AppEngine 堆叠应用程序从单个 Maven 模块重构为多个 - 我可以编译,运行 AppEngine 开发服务器并部署。
我需要一些关于使用 GWT mojo. Now the client and server components are split into different modules and packaged using a EAR module 配置 GWT SuperDevMode 的指导,我不确定从哪里开始。
项目布局类似于:
/app-client (GWT) - I use the GWT mojo here to compile a client WAR. I used to have everything in here.
/app-core (Shared Code) - JAR
/app-server (Default AppEngine Module) - WAR
/app-auth (Auth AppEngine Module) - WAR
/app-worker (Worker AppEngine Module) - WAR
/app-ear (EAR Package) - I use the AppEngine mojo here for deployment.
pom.xml - parent
我假设 app-ear
模块上的 GWT mojo 必须是 运行,但是如何向 运行 配置提供 app-client
源?
Mojo 的 GWT Maven 插件在 multi-module 构建中并不容易 运行 开发模式。要获得正确的类路径,您需要 运行 您的 app-client
模块中的 gwt:run
或 gwt:run-codeserver
目标(为此您需要 mvn install
您的dependencies –app-core
– and/or hack around with profiles and the build-helper-maven-plugin
; see this POM for example, 两者都需要 mvn install
来解决依赖关系,并使用build-helper-maven-plugin
这样您就可以更改共享代码而无需 mvn install
并重新启动开发模式)。
FWIW,net.ltgt.gwt.maven:gwt-maven-plugin
(免责声明:我是作者)从一开始就考虑到了 use-case;所以你实际上在父模块上 运行 gwt:devmode
或 gwt:codeserver
并告诉它哪个模块是 GWT 应用程序以及在哪里生成 *.nocache.js
.