The attached file reproduces the problem, plus demonstrates how the import also creates a src/.../application.xml file within the EAR project and a WEB-INF/lib directory within the WAR project.
This was originally posted as an Eclipse WTP problem (https://bugs.eclipse.org/bugs/show_bug.cgi?id=285510).
They rejected it and told me to post it within m2eclipse. This bug report looked to match the issue.
Steps To Reproduce:
1.unzip the example provided
2.note the number of file in the source tree; $ find . -type f | grep -v
.classpath | grep -v .project | grep -v .settings | wc -l
3.verify the EAR project only has a pom.xml file; $ find ejbsessionBankEAR/ |
grep -v .classpath | grep -v .project | grep -v .settings
4. verify the no MANIFEST.MF files exist; $ find . -name MANIFEST.MF | wc -l
5. import the root and sub-projects into Eclipse as a maven project
6. Note that 3 MANIFEST.MF files were created in our source tree (Impl, EJB,
and WAR); $ find . -name MANIFEST.MF | grep src
7. Note that a new "src" tree was create in the EAR with an application.xml
file; $ find . -name application.xml | grep src
8. Note that the EJB MANIFEST.MF file is in error - it does not contain a
reference to the Impl project; $ cat
9. Note that there was a WEB-INF/lib directory created in the WAR src tree; $
find . -name lib
I am using a fresh download of Eclipse and the m2eclipse plugin as of late July
2009. Whenever I import existing projects (as Maven projects), I am getting
unwanted files generated in my src tree; MANIFEST.MF, WEB-INF/lib, and
application.xml. In some cases, the files have incorrect contents. However,
100% of the time I never want these files in my src tree. Maven will create
these in my target tree. By placing them in the src tree, they are being mixed
up with real CM code.
Note that you do not need to successfully build the maven project in order to
demonstrate that the unwanted src files get created; just import it into