spek icon indicating copy to clipboard operation
spek copied to clipboard

Could not find spek:spek-runtime:2.0.16

Open DmitriyZaitsev opened this issue 5 years ago • 19 comments

I started getting this error message after an update from 2.0.15 -> 2.0.16, which is weird as I see that that the latest available version of spek-runtime here is 2.0.0.

Could not resolve all files for configuration ':app:developDebugUnitTestRuntimeClasspath'.
   > Could not find spek:spek-runtime:2.0.16.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/spek/spek-runtime/2.0.16/spek-runtime-2.0.16.pom
       - https://repo.maven.apache.org/maven2/spek/spek-runtime/2.0.16/spek-runtime-2.0.16.pom
       - https://jitpack.io/spek/spek-runtime/2.0.16/spek-runtime-2.0.16.pom
       - https://jcenter.bintray.com/spek/spek-runtime/2.0.16/spek-runtime-2.0.16.pom
     Required by:
         project :app > org.spekframework.spek2:spek-runner-junit5:2.0.16

DmitriyZaitsev avatar Apr 15 '21 08:04 DmitriyZaitsev

In 2.0.16 publishing was moved to Maven Central due to bintray being shutdown. Do you have mavenCentral() in your repositories block?

raniejade avatar Apr 15 '21 09:04 raniejade

Yes, I have. I see on Maven that all spek modules have the latest version 2.0.16 except spek-runtime which is 2.0.0.

DmitriyZaitsev avatar Apr 15 '21 09:04 DmitriyZaitsev

Ahh wait, spek-runner-junit5 shouldn't need spek-runtime but that should be spek-runtime-jvm. The POM file for spek-runner-junit5 is correct: https://repo1.maven.org/maven2/org/spekframework/spek2/spek-runner-junit5/2.0.16/spek-runner-junit5-2.0.16.pom. I wondder why is it asking for spek-runtime. 🤔

raniejade avatar Apr 15 '21 09:04 raniejade

My declared dependencies.

    val spekVersion = "2.0.15"
    testImplementation("org.spekframework.spek2:spek-dsl-jvm:$spekVersion")
    testImplementation("org.spekframework.spek2:spek-runner-junit5:$spekVersion")

Works perfectly until the change to 2.0.16

DmitriyZaitsev avatar Apr 15 '21 09:04 DmitriyZaitsev

Can you setup a sample project that replicates the issue?

raniejade avatar Apr 15 '21 09:04 raniejade

Unfortunately, no, sorry. But maybe you'll find helpful this output from $ ./gradlew app:dependencies

+--- org.spekframework.spek2:spek-runner-junit5:2.0.16
|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61 -> 1.4.31 (*)
|    +--- spek:spek-runtime:2.0.16 FAILED
|    \--- org.junit.platform:junit-platform-engine:1.6.0
|         +--- org.junit:junit-bom:5.6.0
|         |    +--- org.junit.platform:junit-platform-commons:1.6.0 (c)
|         |    \--- org.junit.platform:junit-platform-engine:1.6.0 (c)
|         +--- org.apiguardian:apiguardian-api:1.1.0
|         +--- org.opentest4j:opentest4j:1.2.0
|         \--- org.junit.platform:junit-platform-commons:1.6.0
|              +--- org.junit:junit-bom:5.6.0 (*)
|              \--- org.apiguardian:apiguardian-api:1.1.0

The dependency really comes from spek-runner-junit5 ¯\_(ツ)_/¯

DmitriyZaitsev avatar Apr 15 '21 09:04 DmitriyZaitsev

What gradle version are you using?

raniejade avatar Apr 15 '21 10:04 raniejade

Btw, for 2.0.15 you're right, it depends on spek-runtime-jvm

+--- org.spekframework.spek2:spek-runner-junit5:2.0.15
|    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61 -> 1.4.31 (*)
|    +--- org.spekframework.spek2:spek-runtime-jvm:2.0.15
|    |    +--- org.spekframework.spek2:spek-dsl-jvm:2.0.15 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.61 -> 1.4.31 (*)
|    |    +--- org.jetbrains.kotlin:kotlin-reflect:1.3.61 -> 1.4.31
|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.31 -> 1.4.32 (*)

DmitriyZaitsev avatar Apr 15 '21 10:04 DmitriyZaitsev

I use Gradle v7.0-rc-2

DmitriyZaitsev avatar Apr 15 '21 10:04 DmitriyZaitsev

I have the same or a similar problem with atrium (using gradle 6.7)

* What went wrong:
Could not determine the dependencies of task ':spek:test'.
> Could not resolve all task dependencies for configuration ':spek:testRuntimeClasspath'.
   > Could not find spek:spek-runtime:2.0.16.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/spek/spek-runtime/2.0.16/spek-runtime-2.0.16.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
     Required by:
         project :spek > org.spekframework.spek2:spek-runner-junit5:2.0.16

https://github.com/robstoll/atrium/pull/869/checks?check_run_id=2355507816

robstoll avatar Apr 15 '21 18:04 robstoll

My guess it has something to do with not publishing the kotlinMultiplatform publication. Weirdly enough I didn't do any changes publications from 2.0.15 -> 2.0.16.

raniejade avatar Apr 15 '21 23:04 raniejade

Interesting, bintray's publish plugin ignored gradle's module metadata files when publishing so it wasn't present in 2.0.15 but now present in 2.0.16 due to the move to central. I think I just need to publish kotlinMultiplatform publication to fix this.

raniejade avatar Apr 15 '21 23:04 raniejade

@DmitriyZaitsev @robstoll I suggest to use 2.0.15 for now. #965 will be included in 2.0.17.

raniejade avatar Apr 16 '21 01:04 raniejade

Good, I am actually still on 2.0.12 because of https://github.com/spekframework/spek/issues/927. Any chance you fix this as well? Can I help somehow?

robstoll avatar Apr 16 '21 11:04 robstoll

Ahh, totally forgot about that issue. @sh-soltanpour is going to look at it.

raniejade avatar Apr 18 '21 09:04 raniejade

when will 2.0.17 be released?

rburgst avatar Aug 28 '21 07:08 rburgst

@rburgst it is out already.

raniejade avatar Aug 28 '21 08:08 raniejade

Hm, its not listed on the github releases

rburgst avatar Aug 28 '21 08:08 rburgst

https://search.maven.org/search?q=g:org.spekframework.spek2

raniejade avatar Aug 28 '21 10:08 raniejade