简体   繁体   English

Eclipse不部署Maven依赖项

[英]Eclipse don't deploy maven dependencies

I have a ear project with maven and i want to hot deploy in a jboss with eclipse (m2e/jboss tools). 我有一个Maven的耳项目,我想用eclipse(m2e / jboss工具)在jboss中热部署。

The ear has a two war and one ejb modules. 耳朵有两个war和一个ejb模块。 The problem is when i deploy the ear (Server > add remove and clean/publish) the lib folder of the ear is empty when i expect find the ejb dependencies inside. 问题是当我部署耳朵(服务器>添加删除并清除/发布)时,当我期望在其中找到ejb依赖项时,耳朵的lib文件夹为空。

If i run "mvn clean install" the generated ouptput are correct and the eclipse "ear deplyment assembly" of the project are updated and show the dependencies. 如果我运行“ mvn clean install”,则生成的输出是正确的,并且项目的日食“耳朵组装”会更新并显示依赖项。 If, in the deployment assembly, delete one of the dependencies and add it manualy (exact same configuration relative .m2 folder) then it deployed. 如果在部署程序集中删除一个依赖项并手动添加它(与.m2文件夹完全相同的配置),则将其部署。

Workstation: 工作站:

  • Windows 7 Windows 7的
  • Jboss 5.2 EAP Jboss 5.2 EAP
  • Eclipse Oxygen/ Proton and Red Had Developer Studio 12 Eclipse Oxygen / Proton和Red Had Developer Studio 12
  • Java 1.8.0_181 (eclipse) Java 1.7.0_75 (jboss) Java 1.8.0_181(日食)Java 1.7.0_75(jboss)
  • Maven embedded 3.5.3 and exgternal 3.5.4 Maven嵌入式3.5.3和外部3.5.4

Any idea? 任何想法?

Thanks 谢谢

I think I found the problem and the solution. 我想我找到了问题和解决方案。

The problem is eclipse sets by default the oldest version of the EAR (1.3). 问题是默认情况下,Eclipse集是EAR(1.3)的最旧版本。 If I add <version> X </ version> in the configuration of maven-ear-plugin, the problem will be solved. 如果在maven-ear-plugin的配置中添加<version> X </ version> ,则将解决该问题。

To force eclipse to update the configuration, delete the project, run mvn eclipse: clean clean (verify that all eclipse settings have been removed) and re-import the project (mvn install && maven -> update project). 要强制eclipse更新配置,请删除项目,运行mvn eclipse:clean clean(验证是否已删除所有eclipse设置)并重新导入项目(mvn install && maven->更新项目)。 If I check the facets of the project configuration, I will now show the new version. 如果检查项目配置的各个方面,现在将显示新版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM