我正在从Ant到Maven重写遗留的Spring项目构建脚本。该项目有几个GWT模块,每个都编译为JAR。当前项目结构由几个Maven的模块,这是或多或少像这样: mainProject |- AnalyzerGWT <-- this module uses GWT |- analyzer <-- this doesn't |- someOtherModule |- p4you-spring <-- this module has resources and builds WAR
maven-gwt-plugin和打包到JAR
每个模块,其使用GWT,具有以下在其的pom.xml代码(模块称为AnalyzerGWT):
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<gwtSdkFirstInClasspath>true</gwtSdkFirstInClasspath>
<compileSourcesArtifacts>
<artifact>com.pamm:portal-common</artifact>
<artifact>com.pamm:analyzer</artifact>
</compileSourcesArtifacts>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
它编译成功和结果GWT资源保存到AnalyzerGWT /目标/ AnalyzerGWT-1.0/com.pamm.analyzer.gwt.Analyzer/,不包括在此目录中,不过含量,从而导致JAR文件。
有没有一种优雅的方式将此目录的内容复制到JAR的根路径中?
我想你应该建立和安装这个GWT模块,然后在那里添加依赖关系在你的战争项目 – Ajax