Repository Layout Definition

This is the final layout for the repository available in Maven 2.x and its related Ant tasks.

This document should be incorporated into the main Maven site shortly, and a link left here as some external people have linked in directly.

Issues with the old layout

The current layout looks like this:

/$groupId/$type + "s"/$artifactId-$version.$type

The new layout:

Changes from the old way includes:

For primary artifacts:


For secondary artifacts:


$groupId is a array of strings made by splitting the groupId's on "." into directories. The group org.apache.maven would then yield: org/apache/maven. This should mostly mirror the package structure in Java, though can apply to any language.

For each primary artifact there will be a POM:

POMs that are exclusively parents (packaging = pom) will have the same filename.

Secondary artifacts do not need a POM - they will reference the associated primary POM.

For each file that is the repository there must be a file containing the checksum of the file, typically md5 or sha1. There may also be a digital signature (eg .asc an ascii armoured openpgp signature)

A complete example

In the /org/codehaus/plexus directory:



Different Repositories

To ease the different uses and archival policies there will later be added 3 repository types:

  1. SNAPSHOT repository, where only snapshots are stored
  2. Archive repository, a read only repository where old releases can be downloaded from
  3. Release repository, where official, current releases go

Repositories can be any combination of these.

If using an archive repository, it might be considered as a deprecated reository, so you could warn on uses of this for anything other than building old releases themselves.

POM referencing

The POM will always reference the primary artifact.

There can only be one POM for a groupId:artifactId combination - type does not factor into it.

The conflict ID of a dependency is:
and the full versioned ID is

The inclusion of type is to accommodate the coexistence of subtypes: eg ejb and ejb-client.

Subtypes are created by particular mojos: eg ejb packaging will create both an ejb and an ejb-client. apidocs:package will create a JAR of the javadocs.

Dependencies will generally only reference the type corresponding to the packaging. However, in some cases, dependency on a subtype will also be required, eg:

So two projects with the same group ID and artifact ID, but different packaging are not valid together. However, two dependencies with different types are. Therefore the common use case of having tlds with the same group/artifact ID will work, eg: