IntelliJ and Maven Source folder issue

It happened to me on Idea 11 that everything was ok, but sources were not recognized. I opened that project as maven - from parrent pom - and selected delete existing idea files and generate new. It worked then.


IntelliJ IDEA follows Maven conventions and will automatically configure /src/main/java as Sources root.

In case you are using non-standard directories for the sources, check IDEA Maven FAQ for the workaround:

<sourceDirectory>...</sourceDirectory> will be added as Source folder