1

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 1

3

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

Sign up to request clarification or add additional context in comments.

2 Comments

I use maven-archetype-webapp, but it doesn't generate /src/main/java
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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.