gpt4 book ai didi

java - 将 Artifact 从本地 Gradle Artifact 存储库部署到 JCenter/MavenCentral

转载 作者:行者123 更新时间:2023-11-30 06:46:19 26 4
gpt4 key购买 nike

我目前使用 JFrog artifactory gradle 插件将我的 java 构建 Artifact 上传到本地 Artifact 存储库(Gradle 默认存储库布局)。我想将其中一些部署到 JCenter 和/或 Maven Central,使它们开源并可供任何人访问。为此,我在 Artifactory 上创建了一个分发版(使用默认设置),并将其链接到我创建的 Bintray 帐户。但是,当我尝试将 Artifact 从本地 Artifact 分发到此分发版时,我收到以下错误并且过程失败。

File cloud-sdk-java/com/cloud/sdk/device_directory/1.2.0/device_directory-1.2.0.pom resulted with the following errors
Coordinate Field package in rule 'Gradle-default' contains tokens that were not matched: ${module} for artifact cloud-sdk-java/com/cloud/sdk/device_directory/1.2.0/device_directory-1.2.0.pom, failing this rule.
Coordinate Field path in rule 'Gradle-default' contains tokens that were not matched: ${artifactPath} for artifact cloud-sdk-java/com/cloud/sdk/device_directory/1.2.0/device_directory-1.2.0.pom, failing this rule.
Coordinate Field version in rule 'Gradle-default' contains tokens that were not matched: ${baseRev} for artifact cloud-sdk-java/com/cloud/sdk/device_directory/1.2.0/device_directory-1.2.0.pom, failing this rule.

我试图创建一些自定义“布局”来解决这个问题,但没有成功。

我是否做错了明显的事情?

最佳答案

因为你想将你的库发布到 JCenter 和 MavenCentral,所以你必须与 maven 布局兼容。

您应该将构建部署到 Artifactory 中的 maven2 布局存储库:

gradle-default: [org]/[module]/baseRev/[module]-baseRev(-[classifier]).[ext]

maven-2-default: [orgPath]/[module]/baseRev/[module]-baseRev(-[classifier]).[ext]

HTH

关于java - 将 Artifact 从本地 Gradle Artifact 存储库部署到 JCenter/MavenCentral,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47759118/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com