Question

There are multiple modules in my application . All of them are maven projects .

So I am working on creating a parent pom for all these projects and was able to create one and ran maven build on this parent pom and works fine build

But when I opened the project in eclipse , the parent pom was not included in the projects displayed so it was picking it up for the build process to take place . My project structure is as follows

ProjectA
    |
    --------subProjects     
ProjectB  
   |
   --------subprojects
ProjectC    
   |
   --------subProjects
ProjectD
   |
    -------subprojects
Pom.xml

So what do I need to make an eclipse recognise this parent pom ? I created another maven module and made it parent pom . But is there any way i could avoid creating another project and achieve the above scenario ?

Was it helpful?

Solution

One thing you can do is to import the global structure as a maven project on its own and then import the subprojects one by one as maven project in eclipse.

OTHER TIPS

you can use mvn eclipse:eclipse in the command line for all the project one by one, and then you can select by importing(Maven Project Type) all the maven projects if you select the directory on the top of your maven projects. In this case you make all settings in the pom and no additional configs in eclipse.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top