Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does a maven repository have a standard format?

How are repos laid out? Are they the same? If so, who specifies the format.

like image 944
chad Avatar asked Nov 13 '12 23:11

chad


People also ask

What Maven repository formats are supported?

A Maven repository stores two types of components: releases and snapshots. Release repositories are for stable, static release components. Snapshot repositories are frequently updated repositories that store binary software components from projects under constant development.

What is Maven repository type?

A repository in Maven holds build artifacts and dependencies of varying types. There are exactly two types of repositories: local and remote: the local repository is a directory on the computer where Maven runs. It caches remote downloads and contains temporary build artifacts that you have not yet released.

What is Maven format?

It is an XML file that contains information about the project and configuration details used by Maven to build the project. It contains default values for most projects.

What is repository layout in Maven?

The remote repository layout defines how the central repositories used by Apache Maven as well as a non-trivial number of third party clients can access the artifacts produced as versioned releases of dependent projects.


2 Answers

Repository layout for Maven is defined very strictly. Maven itself is the tool that completely handles the repository.

/$groupIdWithSlashes/$artifactId/$version/$artifactId-$version.$extension
/$groupIdWithSlashes/$artifactId/$version/$artifactId-$version-$classifier.$extension

Read more here on details of the layout, and here on details of metadata files.

Note that Nexus has similar layout in its storage, but (in some cases) slightly different format of metadata.xml file.

Other repository managers can have completely different layout in its internal storage - like Artifactory. Anyway, the URL structure must be (and is) identical.

like image 165
Petr Kozelka Avatar answered Sep 23 '22 19:09

Petr Kozelka


Just to update the links given by Petr above... The maven documents appear to have moved to Maven Repository Layout and Maven Repository Metadata

like image 29
Ross Black Avatar answered Sep 19 '22 19:09

Ross Black