java – 将类路径添加到在maven集成测试中运行的码头

我正在为一个生成战争文件的Maven项目设置集成测试. (如这里所示 http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin/.)然而,我的war文件需要一堆在classpath上的.properties文件,我不想束缚在战争中.

有没有办法(最好通过插件配置)将文件添加到jetty使用的类路径?

我在谷歌搜索并发现了http://markmail.org/message/awtqrgxxttra3uxx,但是据我所知,这根本不是真的有效.找不到.properties文件.

解决方法

应该可以使用webAppConfig配置元素(从 this thread获取的样本):
<webAppConfig>
  <contextpath>/nportal</contextpath>
  <!-- All I want to do here is add in the /etc/jetty/classes for runtime files. For some reason I have to also add back in the /target/classes directory -->
  <extraClasspath>${basedir}/target/classes/;${basedir}/etc/jetty/classes/</extraClasspath>
</webAppConfig>

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...