


When stored within a repository, the group acts much like the Java packaging structure does in an operating system. It is, however, a good practice to follow. Note that the dot-notated groupId does not have to correspond to the package structure that the project contains. Group ID's do not necessarily use the dot notation, for example, the junit project. For example, all core Maven artifacts do (well, should) live under the groupId.

This marks a specific place in a repository, acting like a coordinate system for Maven projects: The three fields act much like an address and timestamp in one. groupId:artifactId:version are all required fields (although, groupId and version do not need to be explicitly defined if they are inherited from a parent - more on inheritance later). The POM defined above is the bare minimum that Maven allows. This is unlike a build.xml file, where tasks are almost always dependant on the lines executed before it. If some external force causes the lifecycle to skip the Ant plugin execution, it does not stop the plugins that are executed from doing their magic. Whereas a build.xml tells Ant precisely what to do when it is run (procedural), a POM states its configuration (declarative). For example, by configuring the maven-antrun-plugin, one can embed Apache Ant tasks inside of the POM. That is not to say that the POM cannot affect the flow of the lifecycle - it can. It is the declarative manifestation of the "who", "what", and "where", while the build lifecycle is the "when" and "how". The POM contains all necessary information about a project, as well as configurations of plugins to be used during the build process. That is currently the only supported POM version, and is always required. This is a listing of the elements directly under the POM's project element. In fact, in the Maven world, a project does not need to contain any code at all, merely a pom.xml. It is a one-stop-shop for all things concerning the project. A project contains configuration files, as well as the developers involved and the roles they play, the defect tracking system, the organization and licenses, the URL of where the project lives, the project's dependencies, and all of the other little pieces that come into play to give code life. When in the presence of Maven folks, speaking of a project is speaking in the philosophical sense, beyond a mere collection of files containing code. It is an XML representation of a Maven project held in a file named pom.xml.

The POM 4.0.0 XSD and descriptor reference documentation.
