1
我们正在与Maven和Hudson一起进行单元测试和战争建设。我们的客户需要将源代码(java和资源)复制到WEB-INF/src。Hudson和Maven。打包源代码/资源到WEB-INF/src
有一个简单的方法来做到这一点与maven?
预先感谢您。
我们正在与Maven和Hudson一起进行单元测试和战争建设。我们的客户需要将源代码(java和资源)复制到WEB-INF/src。Hudson和Maven。打包源代码/资源到WEB-INF/src
有一个简单的方法来做到这一点与maven?
预先感谢您。
这应该可以通过将src/main/java
和src/main/resources
声明为Maven War Plugin配置中的其他Web资源目录来实现。由Adding and Filtering External Web Resources例子启发:
...
<configuration>
<webResources>
<resource>
...
</resource>
<resource>
<directory>src/main/java</directory>
<!-- override the destination directory for this resource -->
<targetPath>WEB-INF/src</targetPath>
</resource>
<resource>
<directory>src/main/resources</directory>
<!-- override the destination directory for this resource -->
<targetPath>WEB-INF/src</targetPath>
</resource>
</webResources>
</configuration>
...
非常感谢,我会尝试:-) – sourcerebels 2010-09-07 08:34:24
@SourceRebels不客气。 – 2010-09-07 08:48:18
它工作。再次感谢。 – sourcerebels 2010-09-07 10:09:02