------ Introduction to the Standard Directory Layout ------ Jason van Zyl ------ 2014-03-09 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License at ~~ ~~ http://www.apache.org/licenses/LICENSE-2.0 ~~ ~~ Unless required by applicable law or agreed to in writing, ~~ software distributed under the License is distributed on an ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ~~ KIND, either express or implied. See the License for the ~~ specific language governing permissions and limitations ~~ under the License. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Introduction to the Standard Directory Layout Having a common directory layout would allow for users familiar with one Maven project to immediately feel at home in another Maven project. The advantages are analogous to adopting a site-wide look-and-feel. The next section documents the directory layout expected by Maven and the directory layout created by Maven. Please try to conform to this structure as much as possible; however, if you can't these settings can be overridden via the project descriptor. *--------------------------------+-----------------------------------------------+ | <<>> | Application/Library sources *--------------------------------+-----------------------------------------------+ | <<>> | Application/Library resources *--------------------------------+-----------------------------------------------+ | <<>> | Resource filter files *--------------------------------+-----------------------------------------------+ | <<>> | Configuration files *--------------------------------+-----------------------------------------------+ | <<>> | Application/Library scripts *--------------------------------+-----------------------------------------------+ | <<>> | Web application sources *--------------------------------+-----------------------------------------------+ | <<>> | Test sources *--------------------------------+-----------------------------------------------+ | <<>> | Test resources *--------------------------------+-----------------------------------------------+ | <<>> | Test resource filter files *--------------------------------+-----------------------------------------------+ | <<>> | Integration Tests (primarily for plugins) *--------------------------------+-----------------------------------------------+ | <<>> | Assembly descriptors *--------------------------------+-----------------------------------------------+ | <<>> | Site *--------------------------------+-----------------------------------------------+ | <<>> | Project's license *--------------------------------+-----------------------------------------------+ | <<>> | Notices and attributions required by libraries that the project depends on *--------------------------------+-----------------------------------------------+ | <<>> | Project's readme *--------------------------------+-----------------------------------------------+ At the top level files descriptive of the project: a <<>> file (and any properties, <<>> or <<>> if using Ant). In addition, there are textual documents meant for the user to be able to read immediately on receiving the source: <<>>, <<>>, etc. There are just two subdirectories of this structure: <<>> and <<>>. The only other directories that would be expected here are metadata like <<>> or <<<.svn>>>, and any subprojects in a multiproject build (each of which would be laid out as above). The <<>> directory is used to house all output of the build. The <<>> directory contains all of the source material for building the project, its site and so on. It contains a subdirectory for each type: <<
>> for the main build artifact, <<>> for the unit test code and resources, <<>> and so on. Within artifact producing source directories (ie. <<
>> and <<>>), there is one directory for the language <<>> (under which the normal package hierarchy exists), and one for <<>> (the structure which is copied to the target classpath given the default resource definition). If there are other contributing sources to the artifact build, they would be under other subdirectories: for example <<>> would contain Antlr grammar definition files.