简体   繁体   English

将工件从本地Gradle工件存储库部署到JCenter / MavenCentral

[英]Deploying artifacts from a local Gradle artifactory repository to JCenter/MavenCentral

I currently upload my java build artifacts to a local artifactory repository (Gradle default repository layout) using JFrog artifactory gradle plugin. 我目前使用JFrog人工制品gradle插件将Java构建构件上传到本地人工制品存储库(Gradle默认存储库布局)。 I would like to deploy some of them to JCenter and/or Maven Central making them opensource and accessible to anyone. 我想将其中一些部署到JCenter和/或Maven Central,使它们开源并可以被任何人访问。 For that purpose, I created a distribution (using default settings) on Artifactory which I linked to a Bintray account that I created. 为此,我在Artifactory上创建了一个分配(使用默认设置),该分配链接到我创建的Bintray帐户。 However, when I try to distribute artifacts to this distribution from the local artifactory, I receive the following errors and process fails. 但是,当我尝试从本地工件将工件分配到此分布时,我收到以下错误,并且过程失败。

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.

I tried to create some custom "Layout" to solve this problem but without success. 我试图创建一些自定义“布局”来解决此问题,但没有成功。

Do I do obvious things wrong? 我做错明显的事情吗?

Because you want to publish your library to JCenter and MavenCentral then you have to be compatible with the maven layout. 因为要将库发布到JCenter和MavenCentral,所以必须与Maven布局兼容。

You should deploy your build to a maven2 layout repository in Artifactory: 您应该将构建部署到Artifactory中的maven2布局存储库中:

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

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

HTH HTH

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gradle 无法从本地工件下载外部依赖项,应从 mavenCentral 下载 - Gradle fails to download external dependency from local artifactory which should be downloaded form mavenCentral 从Artifactory远程存储库下载大型工件 - Downloading Large Artifacts from Artifactory Remote Repository 在 org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler 类型的存储库容器上找不到 arguments [] 的方法 jCenter() - Could not find method jCenter() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler 将Maven工件从Artifactory部署到WebLogic12c - Deploying Maven artifacts from Artifactory to WebLogic12c 从 jcenter() 更改为 mavenCentral() 并丢失了 javax.jms - changed from jcenter() to mavenCentral() and got missing javax.jms 如何使用gradle将Artifactory中的工件从项目类路径中提取出来? - How to pull artifacts from Artifactory to project classpath using gradle? 使用人工制品从Gradle中拉出人工制品或依赖项的问题 - Issues pulling artifacts or dependencies using Gradle from artifactory 使Gradle使用Maven本地存储库下载工件 - Make Gradle use Maven local repository for downloading artifacts 将 maven 构建的工件部署到存储库 - Deploying artifacts built by maven to repository 工件不在本地存储库错误中 - artifacts are not in local repository error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM