What is the procedure to make a Java EE WebApp with Maven and Intellij?
This is what I do:
- File / New / Project
- Project Type : Maven
- Create From archetype : maven-archetype-webapp
But when I create a servlet IntelliJ shows a symbol on the servlet:
This symbol is "Java class located out of the source root. Refer to the section Configuring Content Roots for details"
If I launch the project I get an error.
If I mark the "resources" directory as "Sources Root", the project works.
But if I reload Maven (right click / maven / reimport) the resources directory lost the "Source Root" structure.
I think something is wrong in my procedure.