Who knows what archetype should be chosen to get such directory layout http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
1 Answer
any archetype, the directory layout is common for all maven projects, check for any archetype and try i.e. http://docs.codehaus.org/display/MAVENUSER/Archetypes+List
http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false if you don't see the directories created, just create them by hand, maven will recognize them and use their contents as they are intended
2 Comments
Constantine Gladky
I use maven-archetype-webapp, but it doesn't generate /src/main/java
ilcavero
As I added in my answer later, just create it by hand, the archetype you used probably does not include any .java files so it does not find the need to create the directory. The important thing is that you don't need to configure anything else for maven to know that what's inside src/main/java ara .java files to be compiles