5
votes

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

2

2 Answers

2
votes

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.

1
votes

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