Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Double source folder in eclipse when creating new maven project

I'm using Eclipse kepler to make a maven 2 or 3 project. I used the "webapp" archetype to start with a clean empty project, and I followed some simple helloworld tutorials. However, I noticed that in eclipse my src folder is shown twice, as seen in the picture below:

enter image description here

This is very undesirable, it takes up additional space and they are not very well synchronized, for example the src on the bottom contains the "webapp" folder, but the src on top doesn't. What's the deal with this double structure? Colleagues of me, who use an older version of eclipse, don't see the "java resources" subtab but I can't find a way to turn it off.

like image 205
user1884155 Avatar asked Apr 13 '15 15:04

user1884155


2 Answers

Try package explorer instead of project explorer. It should still show both src folders, but in a nicer way.

like image 80
atamanroman Avatar answered Sep 29 '22 17:09

atamanroman


Anderas B. posted a fix on a related question:

Click the dropdown arrow in the upper right corner of the Package Explorer, then "Filters..." and then check "Name filter patterns" and write "src". Then the second src folder is hidden.

__

Works only for maven projects, otherwise all src folders are hidden.

like image 43
lleo Avatar answered Sep 29 '22 19:09

lleo