Could not find com.commercetools.sdk:commercetools-sdk-java-api:17.1.0-SNAPSHOT

69 Views Asked by At

i am facing issue while trying to setup commercetools sdk v2 , while hitting command gradlew bootRun if anyone can help please help

D:\toolsv2\commercetools-sdk-v2\examples\spring>gradlew bootRun

Task :compileJava FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':compileJava'.

Could not resolve all files for configuration ':compileClasspath'. Could not find com.commercetools.sdk:commercetools-sdk-java-api:17.1.0-SNAPSHOT. Required by: project : Could not find com.commercetools.sdk:commercetools-okhttp-client3:17.1.0-SNAPSHOT. Required by: project :

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

I tried to changes version from gradlew.wrapper.properties file

buts its couldnt help

1

There are 1 best solutions below

1
jenschude On

Run once in the main folder of the repository

./gradlew publishToMavenLocal

This will build the SDK artifacts with the required version number and install it locally in your maven repository. Afterwards the example should be able to find run.