I have a maven project which currently creates a war package
on build. Now I need to bundle it as an ear project
. Any pointers on how to do this. I added the m2e plugin
and modified the pom.xml
file, but, i am not able to get the directory structure as expected. I need the dir structure
as below
project-name
- project-name.ear
- pom.xml
- project-name.war
- projec-name.jar
- META-INF/application.xml
Thanks.
It is strongly recommend that you organize your project structure in proper Maven style:
Normally I will have another child project call
project-name-parent
which use as parent POM for the whole project.In Maven, you don't and you shouldn't have
META-INF/application.xml
as part of your source. It is generated dynamically base on configuration ofmaven-ear-plugin
.