Reputation: 24078
I imported a maven project which had several sub projects into eclipse using maven plugin for eclipse.
Later I wanted to add another sub project to this imported project. What I did was creating a new maven project through eclipse in the default eclipse workspace and moving the created project to the desired location of the original project.
My problem is, even though eclipse treats previous sub projects as projects, newly added project is just shown as a folder, not a sub project. So I cannot add any classes to newly added sub project through eclipse.
Here is my project structure.
It can be seen that even though some folders are shown in blue and some in yellow. The yellow ones are the ones that are not treated as projects.
Can someone help me to make eclipse identify these projects as projects.
Thanks
Upvotes: 2
Views: 599
Reputation: 909
You need to edit the pom of the new project this way :
<parent>
<groupId>com.firm.ex</groupId>
<artifactId>artifact</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1</version>
</parent>
You have to edit the parent pom this way :
<modules>
...
<module>new_project_name</module>
</modules>
Upvotes: 1