Eclipse/maven: solution to cannot nest folders problem
I had the following problem with Eclipse 3.5 (Galileo) and m2Eclipse 0.9.8, but from searching I believe that it occurs with other combinations as well. Situation: I have a maven-ized project in subversion, and I want to check it out into my Eclipse workspace. Method: bring up the subversion repositories view, navigate to the repository folder with the project in it, right click, select the "Check out as Maven Project ..." context-menu option. All seems to be OK – the project gets created, maven dependencies are resolved, etc, except Problem symptom: Eclipse complains that
Cannot nest 'rdfutil/src/test/java' inside 'rdfutil/src'. To enable the nesting exclude 'test/' from 'rdfutil/src' (your project name will obviously differ). And there's a red 'compilation failed' triangle in the problems list. Check the Java build path, all is fine. Check the
pom.xml, all is fine. What to do? Solution Right-click the project node in the project explorer window to first close it, and then again to delete the project, but without removing the project contents on disk. Then, right-click in the project explorer window to "Import ... > Existing project into workspace ...". Navigate to the location of the project, import, and it comes back without the nested file warning.