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
Right click the Maven Project -> Build Path -> Configure Build Path Go to Order and Export tab, you can see the message like '2 build path entries are missing' Now select 'JRE System Library' and 'Maven Dependencies' checkbox Click OK
I have solved this issue by below steps:
Now you can see below in all type of Explorers (Package or Project or Navigator)
src/main/java
src/main/resources
src/test/java
If none of the answers worked for you. You might be in the wrong "Window". I was in "Package explorer" and switching to "Project Explorer" showed me the folders.
Eclipse filters out folders that are marked as source from the "raw" folder path. That is, they are visible only as source folders:
If you can't see them in either place, then they
src/test/java
(not "Source Folder"). After you use Maven->Update Project... on the project, they will be automatically added as source folders, provided you have the default configuration.Now, as I said, those folder will only be used as source if you preserved the default configuration in your POM
. If you defined other resources
and/or testResources
, those will be used instead. In general, Eclipse m2e synchronizes Eclipse's project source folder configuration with what's in your POM
.
EDIT: maybe this is unclear - see those folders at the top? The ones labeled with the /-separated paths? These are your folders. These are the same folders that you would expect to find in main
and test
, just represented differently.
I was not able to see the build path option in the properties as well. Also the
src/main/java
was not visible in Project Explorer
. below solution worked for me
This fixes the issue
If you are looking for Simple/quicker way, you can follow this solution.
Right click on your project
.> Build Path > Configure Build Path > Java Build Path
Source
' tab, there, you can see like <<your_project_name>>/src/main/java(missing)
.Apply and Close
.>New > Source folder > add source folder "src/main/java"
.happy learning and do not forget to upvote :)