You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Repository Layout Definition

This is the proposed layout for the Maven 2.x repository. This is current as at March 15, 2005 and all comments prior to that have been considered to be incorporated.

Issues with the old layout

  • It doesn't scale physically. The disk at ibiblio is completly trashed during peak hours. I've had cases where it used a minute and a half for doing ls in the root.
  • For a user using browsing the repository through a browser it's hard to locate the artifacts the user want because of the number of files in the directory. This might not be a really big problem if we make a application on top of the repository for browsing.
  • The layout doesn't differ between "primary" and "secondary" artifacts. ("secondary" artifacts beeing javadoc, sources etc that do not have a POM of their own).

The current layout looks like this:

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

The proposed layout:

Changes from the old way includes:

  • Overall, the entire directory tree is much deeper. This is for both so that it will scale better in terms of number of files/directories in a single directory. This will ensure that the harddisks that are hosting the repository isn't thrashed like they are on ibiblio today and it will be easier for a user to get a overview over a artifact, the versions of a artifact and the secondary artifacts it has.
  • For each primary artifact there is a pom file.
  • No symlinks.

For primary artifacts:

/$groupId[0]/../${groupId[n]/$artifactId/$version/$artifactId-$version.$extension

For secondary artifacts:

/$groupId[0]/../$groupId[n]/$artifactId/$version/$artifactId-$version-$extra.$extension

$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:

  • A $artifactId-$version.$extension.pom

POMs that are exclusively parents (packaging = pom) will not have such a file however.

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

A complete example

In the /org/codehaus/plexus directory:

 

plexus-1.0.pom
plexus-1.0.pom.md5
plexus-container/0.15-SNAPSHOT/
/plexus-container-0.15-200407151214.jar
/plexus-container-0.15-200407151214.jar.md5
/plexus-container-0.15-200407151214.jar.pom
/plexus-container-0.15-200407151214.jar.pom.md5
/plexus-container-0.15-200407151315.jar
/plexus-container-0.15-200407151315.jar.md5
/plexus-container-0.15-200407151315.jar.pom
/plexus-container-0.15-200407151315.jar.pom.md5
/snapshot-version
plexus-container/0.16-SNAPSHOT/
/plexus-container-0.16-200407151612.jar
/plexus-container-0.16-200407151612.jar.md5
/plexus-container-0.16-200407151612.jar.pom
/plexus-container-0.16-200407151612.jar.pom.md5
/snapshot-version
plexus-container/0.15/
/plexus-container-0.15.jar
/plexus-container-0.15.jar.md5
/plexus-container-0.15.jar.pom
/plexus-container-0.15.jar.pom.md5
/plexus-container-0.15-javadoc.jar
/plexus-container-0.15-javadoc.jar.md5
/plexus-container-0.15-javasrc.jar
/plexus-container-0.15-javasrc.jar.md5
plexus-container/0.16/
/plexus-container-0.16.jar
/plexus-container-0.16.jar.md5
/plexus-container-0.16.jar.pom
/plexus-container-0.16.jar.pom.md5
/plexus-container-0.16-javadoc.jar
/plexus-container-0.16-javadoc.jar.md5
/plexus-container-0.16-javasrc.jar
/plexus-container-0.16-javasrc.jar.md5
/plexus-container-0.16-src.tar.gz
/plexus-container-0.16-src.tar.gz.md5
/plexus-container-0.16-bin.tar.gz
/plexus-container-0.16-bin.tar.gz.md5

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.

  • No labels