Create java resources webapp folder structure with maven

Ranjan Sarkar picture Ranjan Sarkar · Jul 15, 2012 · Viewed 14k times · Source

I want to create /java, /resources, and /webapp/WEB-INF/web.xml folder structure under src.

I have used the -DarchetypeArtifactId=maven-archetype-webapp but it creates /resources /webapp/WEB-INF/web.xml but doesn't create /java folder.

So in spite of creating the folder /java in eclipse manually is there any other way to create with some -DarchetypeArtifactId= so that it creates the above folder structure.

I'll be thankful if someone can tell me how can I customize and design my folder structure and create it with maven without using existing template.

Answer

om39a picture om39a · Jul 15, 2012

When you use -DarchetypeArtifactId=maven-archetype-webapp, java folder wont be created. It needs to be created manually.

It created the following structure

src
└── main
    └── resources
        └── webapp
            └── WEB-INF