Versions Compared

Key

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

...

Repository metadata layout

...

For legacy clients, we need to maintain the current maven-metadata.xml files, however, for newer clients we will provide a more flexible metadata index using JSON. In order to allow for metadata evolution, the JSON format will be subject to the following restrictions:

  • Consumers must ignore unknown keys
  • Producers must preserve unknown keys

The basic format will be something like:

Code Block
json
json
{
  "group":[ // present if there are any artifacts deployed using the repo path as groupId
    "artifactId",
    "artifactId:platformId",
    "artifactId",
    "artifactId:platformId",
    "artifactId:platformId"
  ],
  "artifact":[ // present if there are any artifacts deployed using the repo path as groupId:artifactId[:platformId]
    "version",
    "version",
    "version",
    "version"
  ],
  "org.apache.maven:plugins":[ // this is a Maven specific key, hence namespaced
    {
      "name":"...",
      "artifactId":"...",
      "prefix":"..."
    },
    {
      "name":"...",
      "artifactId":"...",
      "prefix":"..."
    }
  ]
}

Tool specific keys must be prefixed by the top level groupId of the tool to which they are scoped. Each tool is responsible for the structure within that key and how to handle evolution of that structure.

Some examples:

https://repo.maven.apache.org/maven2/io/github/stephenc/maven/repo-metadata.json would be:

Code Block
json
json
{
  "group":[
    "rfmm-maven-plugin"
  ],
  "org.apache.maven:plugins":[
    {
      "name": "Release From My Machine Maven Plugin"
      "prefix": "rfmm"
      "artifactId": "rfmm-maven-plugin"
    }
  ]
}