WTP - m2e不部署传递依赖关系 [英] WTP - m2e not deploying transitive dependencies
问题描述
我有一个以这种方式结构化的网络应用程序:
A.jar - > B.war - > C.war
我使用的是Eclipse Juno,而 WTP版本是1.1 。 A.jar是一个工作区实用程序项目,它被B.war包括在内。 B.war是一个战争项目,被C.war包括在内。这是我这样做的方式:
< dependency>
< groupId> com.projects< / groupId>
< artifactId> B< / artifactId>
< version> 1.0-SNAPSHOT< / version>
< type> war< / type>
< scope>运行时< / scope>
< / dependency>
之后,我将C项目部署到Tomcat服务器。如果我手动将Maven生成的战争部署到Tomcat,那就像一个魅力,因为A.jar包含在WEB-INF / lib 中。然而,当我让 m2e-wtp 执行部署时,我的问题就是出现,因为它正好进行覆盖,但不包括A传递依赖关系。我试着把它当作一个pom,当我读到这里的地方,但我也有同样的结果。
<依赖性>
< groupId> com.projects< / groupId>
< artifactId> B< / artifactId>
< version> 1.0-SNAPSHOT< / version>
< type> war< / type>
< scope>运行时< / scope>
< / dependency>
<依赖关系>
< groupId> com.projects< / groupId>
< artifactId> B< / artifactId>
< version> 1.0-SNAPSHOT< / version>
< type> pom< / type>
< / dependency>
我正在使用最新版本的 m2e (1.2)和 m2e-wtp (0.16),并使我的项目更新为Maven配置。
这是一个m2e-wtp问题,还是只需要以其他方式组织我的项目?
EDITED
我注意到m2e-wtp配置存储在Eclipse的项目中settings / org.eclipse.wst.common.component 文件。这就是我的战争:
< dependent-module deploy-path =/
handle =module:/ overlay / prj / B?includes = ** / **& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp;
< dependency-type>消耗< / dependency-type>
< / dependent-module>
< dependent-module deploy-path =/
handle =module:/ overlay / slf /?includes = ** / **& amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; amp; MF>
< dependency-type>消耗< / dependency-type>
< / dependent-module>
正如我可以看到战争依赖项设置为消费而jar依赖关系设置为使用。
发布的m2e-wtp版本0.17似乎没有解决它。
EDITED(2013-08-30)
今天我回到同样的问题。即使我已经安装了Eclipse kepler,安装了最新稳定的WTP版本,的盒子,这个问题似乎持续下去。我以为已经解决了,但是我显然已经错过了...
我认为这不是您的项目组织的问题。你的问题非常类似于这个m2e-wtp 错误报告。 p>
I have a web application which is structured in this way:
A.jar -> B.war -> C.war
I'm using Eclipse Juno and the WTP version is 1.1. The A.jar is a workspace utility project which is being included by B.war. B.war is a war project that is included by C.war as an overlay. That's the way I'm doing that:
<dependency>
<groupId>com.projects</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
After that, I deploy the C project to the Tomcat server. That works like a charm if I manually deploy the Maven generated war to the Tomcat, because A.jar is included in WEB-INF/lib. However my problem comes when I let m2e-wtp do the deploy, because it's doing the overlay properly but not including the A transitive dependency. I tried including it as a pom, as I read somewhere around here, but I have the same result.
<dependency>
<groupId>com.projects</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.projects</groupId>
<artifactId>B</artifactId>
<version>1.0-SNAPSHOT</version>
<type>pom</type>
</dependency>
I'm using the newest versions of m2e (1.2) and m2e-wtp (0.16) and have my projects updated with the Maven configuration.
Is it an m2e-wtp issue or simply do I have to organize my project in other way?
EDITED
I noticed m2e-wtp configuration is stored into Eclipse's project./settings/org.eclipse.wst.common.component file. That's how it looks for my war:
<dependent-module deploy-path="/"
handle="module:/overlay/prj/B?includes=**/**&excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
<dependent-module deploy-path="/"
handle="module:/overlay/slf/?includes=**/**&excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
As I can see the war dependency is set for consume while the jar dependencies are set for use.
Released m2e-wtp version 0.17 doesn't seem to fix it.
EDITED (2013-08-30)
Today I was back to the same problem. Even I have Eclipse kepler installed with the latest stable release of WTP out of the box, this problem seems to persist. I thought it was solved, but I apparently mischeck it...
I think it is not a problem of your project organization. Your issue is very similar to this m2e-wtp bug report.
这篇关于WTP - m2e不部署传递依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!