【发布时间】:2013-12-28 05:40:57
【问题描述】:
我正在使用 Maven 覆盖并在 pom 中包含一个依赖战争,如下所示
<dependency>
<groupId>com.test.dependent</groupId>
<artifactId>dependent</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
生成的战争文件看起来不错,它包含两个项目的资源,如果我将它部署到我的 tomcat 服务器,一切都会按预期工作。
但是我习惯于在 maven 中使用 jetty 插件并使用目标 jetty:run 运行我的构建
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.10</version>
</plugin>
</plugins>
<finalName>myproject</finalName>
</build>
不幸的是,jetty 似乎不会包含依赖项目中的文件。如何配置插件以考虑依赖项目?
【问题讨论】: