Eclipse does not generate META-INF for .ear

I am trying to add a web project in my ear, but eclipse will not generate / EarContent / META -INF.

What am I doing:

  • The web project test_web_project_1 has already been created.
  • New-> Enterprise Application Project, create an ear.
  • Right-click-> Properties-> Assembly Deployment
  • Add test_web_project_1 as a project.

Then the test_web_project_1 war is added to the module, but the EarContent / META-INF element and the corresponding application.xml are not found.

What am I doing wrong?

enter image description here

+5
source share
2 answers

The Java EE 5 specification makes xml deployment descriptor files optional. This leads to the EAR 5 project, which is created without application.xml by default.

You can create it for your EAR project by clicking once in the parent folder of the project in the Project Explorer panel, and then right-clicking> Java EE Tools> Create Deployment Descriptor Descriptor.

This should populate your ear contents folder with the META-INF / application.xml file.

+2
source

Have you tried the EAR project -> right-click -> properties -> Java EE module dependencies (or "Project Links" depending on the version of Eclipse used)?

+1
source

Source: https://habr.com/ru/post/1214033/


All Articles