Maven standard directory layout
August 13, 2009 03:32:36 Last update: January 09, 2010 21:34:34
Maven asks you to organize your project by a standard directory layout. Although you can override the proposed structure via the project descriptor, conformance is strongly recommended.
At the top level there are only two directories:
The src directory contains a subdirectory for each type of resources:
This is the general layout:
At the top level there are only two directories:
src and target. The target directory is used to house all output of the build. The src directory contains all of the source material for building the project, its site and so on.
The src directory contains a subdirectory for each type of resources:
-
mainfor the main build artifact -
testfor the unit test code -
sitefor your project site's documentation
This is the general layout:
| Directory | Description |
|---|---|
LICENSE.txt | Project's license |
README.txt | Project's readme |
pom.xml | The Maven "Project Object Model" |
src/main/java | under which the normal package hierarchy exists |
src/main/resources | the structure which is copied to the target classpath given the default resource definition |
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/filters | Test resource filter files |
src/site | Site |