Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Maven 2 aims to promotes patterns and best practices to the build of a project.

In order to understand how Maven 2 works for your project, a little bit of theory is required.

The basic concepts in the center of Maven 2 are :

  • The project object model or project desciptor which holds the definition of all the information needed by Maven 2 to build your project.
  • The Dependencies are mainly the jar files of classes libraries used by the project during the build. The dependencies are defined in the project descriptor.
  • The directory convention used by Maven to promote the uniformity of Java projects.
  • The build life cyclewhich show the steps for building the project. Maven 2 is based on the fact that a project needs to pass through some predeined steps to be released, like always generating the sources before compiling and before running the unit tests on it.
  • The Pluginsare units of behaviour for building the project. They are used by Maven 2 to perform each part of the build. Maven 2 in itself do nothing more than calling the plugins in the right order.
  • The Artifactsare the results of a project's build. Maven 2 assume there is one and only one artifact per project. The way the artifact is created depends on its packaging. There is also some results of the build that could be attached to the main artifact and are called attached artifacts.
  • In order to reduce disk space in the source control managment of the project, Maven 2 promotes the use of the Repositories which are mainly Web site holding the artifacts and project descriptor of projects dependencies.
  • The Archetypes are example projects used as foundation for creating a project.
  • When the build process needs to be configured differently based on the developer or the purpose of the build (QA, production) Maven 2 uses Profiles.