【问题标题】:maven-metadata.xml not getting auto generated in artifactorymaven-metadata.xml 没有在工件中自动生成
【发布时间】:2019-09-19 17:47:27
【问题描述】:

我在 Artifactory(artifactory-oss-6.9.1) 中设置了一个本地 maven 存储库,其中存储了一些 SNAPSHOTS。 请看下面的配置

我正在使用 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"

应该自动生成的 maven-metadata.xml 文件没有生成。

请帮忙!

【问题讨论】:

  • 为什么要使用 curl 而不是 maven 来上传工件?

标签: maven artifactory


【解决方案1】:

要触发 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"

【讨论】:

    猜你喜欢
    • 2020-11-19
    • 1970-01-01
    • 2017-10-11
    • 2016-01-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-20
    相关资源
    最近更新 更多