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
This error happens when there are no files inside /src/main/java Just make some empty files inside and the problem will go away.
A side note: lots of version control systems (mercurial for example) do not commit folders if there are no files inside.
Right click on eclipse project go to build path and then configure build path you will see jre and maven will be unchecked check both of them and your error will be solved
I used this tutorial to create my maven web project http://crunchify.com/how-to-create-dynamic-web-project-using-maven-in-eclipse/ and eclipse did not create src/main/java folder for me. When i tired to create the source folder src/main/java eclipse did not let me. So i created the folder outside eclipse in the project directly and then src/main/java appeared in eclipse.
I had a similar issue when I checked out a web project from a github repo on my eclipse. src/main/java was directly inside the project root in Package Explorer. My expectation was that src/main/java be visible inside a source folder "Java Resources". There were few things which I did to achieve this.
My problem was kind of the same at first and then a little different in the sense that when /java
folder showed up, it was deep down in a nested folder somewhere in src/main/resources/java
.
Initallially the problem was being in the Package Explorer
and not in the Project Explorer
as many people have talked about. So,
Project Explorer
However, the main problem was I missed to notice a checkbox at the second step of Maven Project Creation
from the wizard. That got me created a complicated structure and not a clean direct one.
Once I marked it checked
I got a clean project structure as what asked.
I used to get the same problem, but solved it by pointing to the right jre used for the project.
Right click on the project properties java builpath see the jre selected edit it select alternate jre installed jre select the right one ok After changing right click on project>maven>update project
Hope it helps. Attaching screen shot.