Reputation: 1660
I have a problem. I want to create Java Project which uses Servlets and JSP. So I create new Maven project and choose maven-archetype-webapp. So it creates the project, but there are .idea and src folder. There isn't source folder. What should I do to be generated "source" folder. I have the dependencies needed. I am using IntelliJ. While using Eclipse I have absolutely the same problem. I fix it with checking "Maven Dependencies" in "Java Build Path/Order and Export". It worked in eclipse, I don't know why. Or can someone tells me how to create project in IntelliJ which has generated pom.xml, web.xml and "source" folder. The question may be stupid, but I really don't know how and obviously I make something wrong. Thanks for your attention.
Upvotes: 0
Views: 323
Reputation: 5735
You should try to stick to the maven default project layout convention. All tooling defaults to this structure (see the link given above).
In Intellij you can easily create a Maven project via the "New Project" dialog.
If you want to keep your current project layout, you can try to right click on your "source/production/java" Folder and click "Mark Directory As" and then "Source root".
This marks it as Java source folder. You should then be able to create new classes via Context menu.
Upvotes: 2