October 23, 2024
Chicago 12, Melborne City, USA
java

Convert Imported Maven Sub Module to a Maven Project in Eclipse


I have a multi-maven module project which I imported to Eclipse. I did struggle initially to import it with all its sub-modules but per what I remember, the sub-modules were not converted to Maven Project in Eclipse and they didn’t even look like a Java Project. I remember that I used the option "Configure and detect nested projects" and did another import for Existing Maven Project for each sub-module and things looked fine. Even the Maven Build from Eclipse was successful.

However, today I noticed that the node "Maven Dependencies" doesn’t show under the sub-module node in Eclipse, and I don’t see the maven dependencies. I could only see the "JRE System Library" node. I compared the configuration to another project that was imported successfully as Maven Project, and figured out that this newly imported project in Eclipse, its sub-modules are not recognized as Maven Project.

Then, I used the command mvn eclipse:clean eclipse:eclipse and now I can see the Maven Dependencies showing as "Library Dependencies" which means it is still a Java Project not a Maven Project.

I am trying to locate the option to convert it to a Maven project, but I don’t see such an option.

I am thinking to backup one of the sub-modules, delete it from Eclipse and re-import it as a Maven Project.

Any idea how to resolve this problem, please let me know.



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video