Search code examples
eclipsemavensetup-project

How do I configure Eclipse and Maven to not duplicate folder listings?


Help me please. The problem I'm having is that in Eclipse In the Package Explorer, a Maven project that contains sub Maven projects displays duplicates of the same folders. In addition this causes the 'Ctrl + click' to not work.

So for example if you have a folder hierarchy, and almost each folder is another sub project, such as the following....

1/projectX-dev
2/projectX-dev/web-services
3/projectX-dev/web-services/mapping-data
4/projectX-dev/web-services/mapping-organizations
5/projectX-dev/web-services/metrixs
6/projectX-dev/web-services/metrixs/data-ingest
7/projectX-dev/web-services/metrixs/organization-feeds

Then in my package explorer I would have 7 listed items because each folder has its own .pom file. So for example expanding 5 it would contain the code that is also present in 6 & 7 because it is the parent folder which of course makes sense, but this is most annoying because now there are three locations where I can go to get at information where all I would want is for #1 to be displayed. In addition to the layout annoyance, in Eclipse it seems that if I open a file under one of the listings over another then the 'Ctrl + click' to navigate to imported class methods no longer is supported. I am growing tired of this and need some clarification on how to just import the Maven projects and have it where the 'Ctrl + click' functions and the display in the Package Explorer would be 1/projectX-dev and that is it. I don't want all the other listings just the main parent folder. enter image description here As you can see in the image, the expanded folder netops-nice-jira-dev has items which are all listed at the top level as other projects. i.e. ui-extensions & web-services. The rest-service is a project also and it resides inside of the web-services project. So it is pissing me off how if I open a file from one location it allows for the proper interaction with the file such as Ctrl Click to track methods whereas with opening the file from another location it acts like a plain text file. 1 I don't want all these items to be duplicated in my view I just want the main top level project to be displayed and keep it simple to navigate down the structure rather than trying to find the proper place to open a file from. Any suggestions on how to NOT display all the projects that are within the project?


Solution

  • The friggin previous people who put together this project created Eclipse projects within Eclipse project folders and everything was added to the Eclipse project view so things are all screwy.

    If I open files from one project normal IDE functions will work, if I open the files from within one of the many other projects then the IDE functions don't work where i'm being told the project does not exist on the build path.

    How frustrating!