Problem with Eclipse and a Maven multi-module project
Posted
by earth
on Stack Overflow
See other posts from Stack Overflow
or by earth
Published on 2010-06-10T15:56:08Z
Indexed on
2010/06/10
18:02 UTC
Read the original article
Hit count: 261
I have created a Maven project with the following structure:
+ root-project pom.xml (pom) + sub-projectA (jar) + sub-projectB (jar)
I have done the following steps:
- mvn archetype:create –DgroupId=my.group.id –DartifactId=root-project
- mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectA
- mvn archetype:create –DgroupId=my.group.id –DartifactId=sub-projectB
So I have, obviously, in the top-level pom.xml the following elements:
<modules>
<module>sub-projectA</module>
<module>sub-projectB</module>
</modules>
The last step was:
mvn eclipse:clean eclipse:eclipse
Now if I import the root-project in Eclipse, it seems to look at my projects as resources and not like java projects.
However if I import each of child projects sub-projectA and sub-projectB, it looks them like java projects.
This is a big problem for me because I have a deeper hierarchy. Any help would be appreciated!
© Stack Overflow or respective owner