1
[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>
carlspring
  • 31,231
  • 29
  • 115
  • 197
Kimble
  • 7,295
  • 4
  • 54
  • 77

2 Answers2

2

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.

noamt
  • 7,397
  • 2
  • 37
  • 59
  • Okay, so the `xxx/some-lib/1.2.5-SNAPSHOT/maven-metadata.xml` file should be generated by Artifactory? – Kimble Apr 13 '12 at 11:41
  • If a snapshot revision exists and is deployed to a snapshot repository, then yes. – noamt Apr 13 '12 at 11:50
  • Sure? I tried deleting the repository from Artifactory and re-deploy it to see if that helped. `Uploaded: http://maven-proxy.xxx.local:8081/artifactory/xxx-snapshots/xxx/xxx/xxx/some-lib/1.2.5-SNAPSHOT/maven-metadata.xml (2 KB at 50.1 KB/sec)`, but when I attempt to access the very same address I get a 404 - metadata not found for... – Kimble Apr 13 '12 at 11:55
  • Positive. Depending on the repository's snapshot policy, Artifactory basically ignores Maven's deploy requests and calculates the metadata by itself; but it should be there. – noamt Apr 13 '12 at 13:28
  • Then something is probably messed up with the Artifactory installation. I semi-fixed it by configuring the snapshot repository to "deployer" instead of "unique", but I guess that's just one Maven 2 client away from blowing up again. – Kimble Apr 14 '12 at 08:01
0

According to this answer on gradle.org,

The maven-metadata.xml won't exist yet when you publishing a SNAPSHOT version for the first time.

(Subsequent uploads should not display this message since the first publish should create the file.)

TT--
  • 2,956
  • 1
  • 27
  • 46