Search code examples
intellij-ideadependenciesmaven-3

When IntelliJ starts up I always have te reimport my Maven dependencies


When I start up my IntelliJ IDEA, all my classes and feature files are not being recognized. When I reimport all my maven dependencies, it is just working fine, but I have to do this every time I start IntelliJ up.

Is this a setting issue or does anyone has any idea?

enter image description here


Solution

  • It looks like your folders are missing marked "Sources Root", "Test Sources Root" and "Test Resources" -> you can right click on src/main/java, src/test/java and src/test/resources and choose "Mark Directory As..." to do this.

    When you first created the intellij project, if you created it off the pom.xml then these folder designations should be in place (since you are following the default). But in your screenshot they arent, so something is amiss here.

    Try to add them manually, and see how you go.