2
votes

I currently upload my java build artifacts to a local artifactory repository (Gradle default repository layout) using JFrog artifactory gradle plugin. I would like to deploy some of them to JCenter and/or Maven Central making them opensource and accessible to anyone. For that purpose, I created a distribution (using default settings) on Artifactory which I linked to a Bintray account that I created. 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?

1
What is the artifactory version you are using? What license? It might be helpful to know.galusben

1 Answers

4
votes

Because you want to publish your library to JCenter and MavenCentral then you have to be compatible with the maven layout.

You should deploy your build to a maven2 layout repository in Artifactory:

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

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

HTH