简体   繁体   中英

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:

在此输入图像描述

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.

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM