Search code examples
mavenartifactory

maven-metadata.xml not getting auto generated in artifactory


I have setup a local maven repo in Artifactory(artifactory-oss-6.9.1) that stores some SNAPSHOTS. Please see the config below

enter image description here

I am uploading different builds using cURL -

curl -u admin:password -T XXX/target/XXX-0.1-SNAPSHOT.zip "http://localhost:8081/artifactory/bahbah/DataProcessing/DataManager/4.0-SNAPSHOT/DataManager-4.0-20110108.100922-4.zip"

curl -u admin:password -T XXX/target/XXX-0.1-SNAPSHOT.zip "http://localhost:8081/artifactory/bahbah/DataProcessing/DataManager/4.0-SNAPSHOT/DataManager-4.0-20110108.100922-5.zip"

curl -u admin:password -T XXX/target/XXX-0.1-SNAPSHOT.zip "http://localhost:8081/artifactory/bahbah/DataProcessing/DataManager/4.0-SNAPSHOT/DataManager-4.0-20110108.100922-6.zip"

enter image description here

The maven-metadata.xml file which should have been generated automatically, is not getting generated.

Please help!


Solution

  • To trigger the maven-metadata.xml calculation you will also need to deploy a Maven .pom file.
    For the example you have included in your question you will need to deploy at least a minimal .pom file:

    <?xml version="1.0" encoding="UTF-8"?>
    <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <modelVersion>4.0.0</modelVersion>
      <groupId>DataProcessing</groupId>
      <artifactId>DataManager</artifactId>
      <version>4.0-SNAPSHOT</version>
    </project> 
    

    You can use the following curl command:

    curl -u admin:password -T  DataManager-4.0.pom "http://localhost:8081/artifactory/bahbah/DataProcessing/DataManager/4.0-SNAPSHOT/DataManager-4.0-SNAPSHOT.pom"