Good info here.
Having a common directory layout would allow for users familiar with one project to immediately feel at home in another project. The advantages are analogous to adopting a site-wide look-and-feel.
Please try to conform to this structure as much as possible:
| Directory | Description |
| src/main/java | Application/Library sources |
| src/main/resources | Application/Library resources |
| src/main/filters | Resource filter files |
| src/main/assembly | Assembly descriptors |
| src/main/config | Configuration files |
| src/main/webapp | Web application sources |
| src/test/java | Test sources |
| src/test/resources | Test resources |
| src/test/config | Configuration files |
| src/test/filters | Usage resource filter files |
| src/usage/java | Usage sources |
| src/usage/resources | Usage resources |
| src/usage/config | Usage Configuration files |
| src/site | Site |
| LICENSE.txt | Project's license |
| README.txt | Project's readme |
The structure is loosly based on the MAVEN structure at: http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
Another good site is: http://cvs.peopleware.be/training/maven/maven2/standardDirLayout.html
| artifactId/ | project directory |
| |- .cvsignore | contains target, profiles.xml |
| |- pom.xml | POM |
| |- profiles.xml | local, user and project dependent profile definitions; this should not be version controlled |
| |- LICENSE.txt | license of the project |
| |- README.txt | welcome to the reader |
| |- src/ | original material; this should be version controlled |
| ||- main/ | the original material for the artifact |
| |||- java/ | root of main Java source; wil be compiled into target/classes |
| |||- resources/ | main Java resources; will be copied into target/classes |
| |||- webapp/ |||- WEB-INF/ |||`- web.xml ||`- index.jsp | web application with standard web application structure |
| |||- assembly/ ||`- dep.xml | assembly descriptor for maven-assembly-plugin |
| |||- filters/ | resource filter properties files for main Java resources |
| |||- config/ | configuration files for the artifact |
| |||- bash/ |||- groovy/ |||- prolog/ ||`- sql/ | sources in other technologies for the artifact |
| ||- site/ | project documentation in different formates; mvn site will produce a project website in target/site based on this material and structure (Doxia) |
| |||- apt/ ||||- format.apt |||`- index.apt | documentation in APT format (wiki-like HTML generation) |
| |||- fml/ |||`- faq.fml | documentation in FML format (XML based FAQ format) |
| |||- resources/ ||||- css/ ||||- img/ |||`- js/ | site resources; will be copied into target/site as-is |
| |||- site.xml | site descriptor: description of site structure; this will generate menus |
| ||`- xdoc/ ||`- xdoc.xml | documentation in Xdoc format (XML based HTML generation; maven 1 legacy) |
| |`- test/ | original material to test the artifact |
| ||- java/ | root of Java source for testing the artifact; usually JUnit test classes; will be compiled into target/test-classes |
| ||- resources/ | resources for testing the artifact; will be copied into target/test-classes |
| ||- filters/ | resource filter properties files for resources for testing the artifact |
| ||- perl/ ||- haskell/ |`- python/ | sources in other technologies for testing the artifact |
| `- target/ | generated material; this should not be under version control |
| |- artifactId-version.jar | generated artifact |
| |- classes/ | result of compilation of src/main/java and copy of src/main/resources |
| |- exported-pom.xml | consolidated POM |
| |- javadoc/ | javadoc of src/main/java |
| |- site/ | project site generated by mvn site |
| |- surefire-reports/ | test reports |
| |- test-classes/ | result of compilation of src/test/java and copy of src/test/resources |
| `- announcement/ `- announcement.vm | org.codehaus.mojo:changelog-maven-plugin generates announcement mail here |