简体   繁体   中英

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).

The ear has a two war and one ejb modules. 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.

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. If, in the deployment assembly, delete one of the dependencies and add it manualy (exact same configuration relative .m2 folder) then it deployed.

Workstation:

  • Windows 7
  • Jboss 5.2 EAP
  • Eclipse Oxygen/ Proton and Red Had Developer Studio 12
  • Java 1.8.0_181 (eclipse) Java 1.7.0_75 (jboss)
  • Maven embedded 3.5.3 and exgternal 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). If I add <version> X </ version> in the configuration of maven-ear-plugin, the problem will be solved.

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). If I check the facets of the project configuration, I will now show the new version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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