Maven resource folder isn't created

If the resources folder itself doesn't exist create the folder under the folder main. Then Right click the project, go to Maven -> Update Project. It worked for me.


It appears that you may not have created the maven project correctly. Perhaps you may have chosen an archetype, which does not do this correctly.

One possible way (which worked for me) is as follows:

When I do Create a new maven project, and choose Create a simple project (skip archetype selection, I do get the default folders created (src/main/java, src/main/resources, src/test/java, src/test/resources, along with the pom.xml).


As an alternative to creating a new project you could also have fixed the existing one by doing the following:

  1. Do a non-destructive delete of the project from Eclipse i.e. do NOT check "Delete project contents on disk"
  2. In the file system, remove the .settings/, .classpath, and .project files.
  3. Also in the file system, add the resources folders under src/main and src/test.
  4. In Eclipse, do an "Existing Maven Projects" import with the project's folder as the root.

Tags:

Maven