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: 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:
  • main for the main build artifact
  • test for the unit test code
  • site for your project site's documentation

This is the general layout:
LICENSE.txtProject's license
README.txtProject's readme
pom.xmlThe Maven "Project Object Model"
src/main/javaunder which the normal package hierarchy exists
src/main/resourcesthe structure which is copied to the target classpath given the default resource definition
src/main/filtersResource filter files
src/main/assemblyAssembly descriptors
src/main/configConfiguration files
src/main/webappWeb application sources
src/test/javaTest sources
src/test/resourcesTest resources
src/test/filtersTest resource filter files
Share |
| Comment  | Tags