javaeclipsemavenjakarta-eem2e

Eclipse: Import "Existing Maven Projects" create EAR project automatically


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:

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:

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:

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.