Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

Rationale

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. Common Maven procedures strengthen the Maven brand.

The next two sections document 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 must these settings can be overridden via properties as documented in the Integration document.

Common Directory Layout

Directory or file name Content Comment
src/webapp The base directory under which web applications can be found. This directory contains the web application to be built. The web application name is passed to maven as the property ${maven.j2ee.war.name}

Maven-Generated Layout

Directory name Content Comment
target/ Contains compiled WARs and EARs. This directory is used by the J2EE Plug-in as the destination of the built war and ear files