1

我有多模块结构的项目,像这样

root
|
core
  |
  core-services
  |
  core-gwt-ui
|
some-like-core-modules
|
root-war

root-war这是将所有其他模块jar压缩到一个.war的模块。当 maven 构建core-gwt-ui时,我将在src.main中获得webapp目录。与另一个模块是同样的故事。

那么,如何调整root-war.pom以将所有 gwt 构建结果收集到一场战争中

这是我构建core-gwt-ui 的maven 插件配置

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <inplace>true</inplace>
        <runTarget>sample.client.Sample25/Sample25.html</runTarget>
    </configuration>
</plugin>
4

1 回答 1

1

您有 2 个选择:

  1. 您可以在每个项目中gwt:compile您的应用程序,在这种情况下,它们最好是您在root-war中使用覆盖的 WAR

  2. 或者您只需将源代码和类打包并在root-war中执行一个大的gwt:compile

于 2012-09-14T14:11:35.197 回答