I created a free artifactory server on Google Cloud and I'm trying to deploy it, but I have the following error:
Execution failed for task ':artifactoryDeploy'.
java.io.IOException: Could not publish build-info: This plugin is compatible with version 2.2.3 of Artifactory and above. Please upgrade your Artifactory server!
My Gradle config
import groovy.lang.GroovyObject
import org.jfrog.gradle.plugin.artifactory.dsl.PublisherConfig
plugins {
kotlin("jvm") version "1.4.10"
id("com.jfrog.artifactory") version "4.17.2"
`maven-publish`
}
group = "com.rjdesenvolvimento"
version = "0.0.1"
repositories {
jcenter()
maven { url = uri("https://kotlin.bintray.com/ktor") }
}
dependencies {
implementation(kotlin("stdlib"))
api("org.junit.jupiter:junit-jupiter-engine:5.7.0")
api("org.jetbrains.kotlin:kotlin-test-junit5:1.4.10")
api("io.mockk:mockk:1.10.2")
}
tasks {
compileKotlin { kotlinOptions.jvmTarget = "11" }
compileTestKotlin { kotlinOptions.jvmTarget = "11" }
}
publishing {
publications {
create<MavenPublication>("kotlin") {
from(components["kotlin"])
}
}
}
artifactory {
setContextUrl("https://some-addressjfrog.io/artifactory/artifact/")
publish(delegateClosureOf<PublisherConfig> {
repository(delegateClosureOf<GroovyObject> {
setProperty("repoKey", "aries-develop")
setProperty("username", "some-user")
setProperty("password", "some=password")
setProperty("maven", true)
})
})
}
The issue is with using a wrong Artifactory URL (as indicated by @yahavi in the comments).
Please make sure that you are using the root Artifactory context, for example:
The error message from the plugin is misleading and is updated in version 3.9.0 of the Jenkins Artifactory plugin.For more details see this Github issue.