Maven 3 is looking for maven-metadata.xml in the wrong folder (Artifactory 2.5.1.1)

Kimble picture Kimble · Apr 13, 2012 · Viewed 7k times · Source
[08:45:24]Downloading: http://maven-proxy.xxx.local:8081/artifactory/xxx-snapshots/xxx/xxx/xxx/some-lib/1.2.5-SNAPSHOT/maven-metadata.xml
[08:45:24][DEBUG] Could not find metadata xxx.xxx.xxx:some-lib:1.2.5-SNAPSHOT/maven-metadata.xml in xxx-snapshots (http://maven-proxy.xxx.local:8081/artifactory/xxx-snapshots)

Maven seems to be looking for a metadata file in some-lib/1.2.5-SNAPSHOT/maven-metadata.xml. There is however a maven-metadata.xml file residing in some-lib/maven-metadata.xml.

What might be wrong? Should this file be generated by Artifactory or is something wrong with the deployment?

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-deploy-plugin</artifactId>
    <version>2.7</version>
    <configuration>
        <updateReleaseInfo>true</updateReleaseInfo>
    </configuration>
</plugin>

Answer

noamt picture noamt · Apr 13, 2012

Maven metadata may reside on 2 levels:

  1. Under the groupId/artifactId folders - the metadata details which base revisions exist (1.0, 1.1, 1.2-SNAPSHOT, etc.)
  2. Under the groupId/artifactId/integrationRevision folders - the metadata details which specific integration revisions exist;

The latter is needed because Maven's snapshot version may aggregate a number of different unique snapshots. so when requesting 1.0-SNAPSHOT, Maven must discover which actual snapshots exist and determine which one to download.

This metadata should be auto-generated by the repository, only of such snapshot versions exist.