Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse not generating META-INF for .ear

I'm trying to add a web project to my ear, but eclipse won't generate the /EarContent/META-INF.

What I do:

  1. Web project test_web_project_1 already created.
  2. New->Enterprise Application Project, create ear.
  3. Right Click->Properties-> Deployment Assembly
  4. Add test_web_project_1 as a project.

The test_web_project_1 war is then added to modules, but EarContent/META-INF and the corresponding application.xml is not created.

What am I doing wrong?

enter image description here

like image 821
dwjohnston Avatar asked Oct 20 '22 16:10

dwjohnston


2 Answers

The Java EE 5 specification makes the deployment descriptor xml files optional. This results in an EAR 5 project that is created without application.xml by default.

You can create one for your EAR project by Clicking once on the project parent folder in the Project Explorer pane and then right-click > Java EE Tools > Generate Deployment Descriptor Stub.

This should populate your ear content folder with a META-INF/application.xml file.

like image 178
Reenactor Rob Avatar answered Oct 22 '22 23:10

Reenactor Rob


Have you tried with EAR project -> right-click -> properties -> Java EE Module Dependencies ( or 'Project References' depending on the used version of Eclipse) ?

like image 23
harcos Avatar answered Oct 23 '22 00:10

harcos