[英]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.