Issue
I have a bizarre behavior with Eclipse when I try to import an existing maven project, it's a multi-module JEE maven project with a parent and sub-modules. The structure svn looks like this:
- parent
- ear
- webapp1
- webapp2
- shared-library
When I import the project into Eclipse, it automatically create a "shared-libraryEAR" in the same directory of the "parent" project. It looks something like this after the import:
- shared-libraryEAR
- parent
- ear
- webapp1
- webapp2
- shared-library
It does this for every "jar" maven projects in the workspace. It's something normal ? I use Eclipse Oxygen.2 and Eclipse Neon.3 with WebSphere plugins and the default embedded maven.
I can reproduce the same behavior using the demo project in this Stackoverflow answer: Maven2: Best practice for Enterprise Project (EAR file)
After importing the project into Eclipse Oxygen, I have two new EAR project that did not exist in the original project structure. The structure in Eclipse Enterprise Explorer looks like this after the import:
- myproject-application (original ear) ¸
- myproject-business (original ejb)
- myproject-common (original jar lib)
- myproject-commonEAR (new EAR)
- myproject-persistence (original jar lib)
- myproject-persistenceEAR (new EAR)
- myproject-web (original web module)
- parent (original parent project)
Result in eclipse: Image capture of Eclipse Enterprise Explorer
After importing the projects, I usually just delete the unnecessary EAR projects, but it's kind of annoying, is there a solution?
Thanks.
Solution
Trying a fresh copy of eclipse (the same version) solved my problem regarding to this case. I guess, it happened because of a plugin on eclipse.
Answered By - Murat