Could not find org.jetbrains.kotlinx.spark:kotlin-spark-api
I was trying to add the following line in my build.gradle file as said here:
implementation 'org.jetbrains.kotlinx.spark:kotlin-spark-api-3.2_2.12:1.1.0' // Apache Spark
The build.gradle file looks as follows:
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.20"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.0"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.7.0"
implementation group: 'commons-io', name: 'commons-io', version: '2.7'
implementation 'org.jetbrains.kotlinx.spark:kotlin-spark-api-3.2_2.12:1.1.0' // Apache Spark
compileOnly 'org.apache.spark:spark-sql_2.12:3.2.1'
}
test {
useJUnitPlatform()
}
But upon building, it throws the error:
CompactPOC:test: Could not find org.jetbrains.kotlinx.spark:kotlin-spark-api-3.2_2.12:1.1.0.
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Please help resolve the issue.
Oops, looks like we didn't update the getting started guide correctly!
At the time of writing we only support one Scala version, so the correct way to use version 1.1.0 is like org.jetbrains.kotlinx.spark:kotlin-spark-api-3.2:1.1.0
It still throws the same error :(
I'm not sure what's wrong, it's available like that on mavenCentral:
https://mvnrepository.com/artifact/org.jetbrains.kotlinx.spark/kotlin-spark-api-3.2/1.1.0
Maybe another gradle clean?