Search code examples
mavenpom.xmlparent-pom

Multi Module Maven Parent POM


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 ?


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.