Eclipse+Maven src/main/java not visible in src folder in Package Explorer

Sebastian Dusza picture Sebastian Dusza · Sep 13, 2013 · Viewed 123.5k times · Source

I'm wondering why I can't see following folders in src node in Package Explorer

src/main/java
src/main/resources
src/test/java
src/test/resources

I can access those folders as direct children of the project and they exist in the file system.

I'm using Spring Tool Suite (STS of Eclipse).

Maybe I can configure Eclipse somehow ?


enter image description here enter image description here enter image description here

Answer

Ranjith Sekar picture Ranjith Sekar · Jul 28, 2015

I have solved this issue by below steps:

  1. Right click the Maven Project -> Build Path -> Configure Build Path
  2. In Order and Export tab, you can see the message like '2 build path entries are missing'
  3. Now select 'JRE System Library' and 'Maven Dependencies' checkbox
  4. Click OK

Now you can see below in all type of Explorers (Package or Project or Navigator)

src/main/java

src/main/resources

src/test/java