Search code examples
eclipsemavencode-organization

What's a good Maven project structure when developing in Eclipse?


I am new with the Maven. I have two projects. I want this kind of tree:
project1
--pom.xml
project2
--pom.xml
pom.xml

which means I performed aggregation and inheritance. By doing like this and importing two projects in eclipse, the second project can't see junit dependency which is specified in the outer - common pom.xml. The problem with the first project is that instead of having packages i see only folders.


Solution

  • Try using Package Explorer in Eclipse in order to see packages instead folders. Also for this kind of inheritance try to add both projects in one parent project and import this one into Eclipse. In both .pom files of projects you must specify their parent project