代码之家  ›  专栏  ›  技术社区  ›  Archit Arora

maven-metadata.xml未在artifactory中自动生成

  •  0
  • Archit Arora  · 技术社区  · 5 年前

    我在伦敦建立了一个maven回购协议 Artifactory ( artifactory-oss-6.9.1 )它存储了一些快照。 请参阅下面的配置

    enter image description here

    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

    请帮帮我!

    0 回复  |  直到 5 年前
        1
  •  4
  •   Dror Bereznitsky    5 年前

    要触发maven-metadata.xml计算,还需要部署maven.pom文件。
    对于问题中包含的示例,您至少需要部署一个最小的.pom文件:

    <?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> 
    

    可以使用以下curl命令:

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