我正在寻找一种为GWT模块创建包含.class和.java文件的jar文件的方法。有谁知道如何实现?
谢谢!
//尼古拉斯
在pom.xml中编辑资源部分。
<build>
...
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.java</include>
<include>**/*.gwt.xml</include>
</includes>
</resource>
</resources>
...
</build>
您还可以编辑maven-jar-plugin以将其从最终的JAR中排除。
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<!-- but be sure to exclude the source from the final jar file -->
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.gwt.xml</exclude>
</excludes>
</configuration>
</plugin>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句