Artifact 'org.slf4j:slf4j-api:1.7.12@jar' not found

I have build.gradle with this dependency.

testCompile 'com.github.docker-java:docker-java:1.4.0'
testCompile 'org.slf4j:slf4j-api:1.7.12'

When i run gradle build, it gives me this error :-

* What went wrong:
  Could not resolve all dependencies for configuration ':testCompile'.
> Artifact 'org.slf4j:slf4j-api:1.7.12@jar' not found.

* Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Can someone help me with this. How to solve this problem?

This solved my problem.

rm -rf ~/.m2/repository/org/slf4j/

I guess i have corrupted local maven repo.

I am facing the same issue for junit dependency. But the solution you specified could not resolve my issue.
I am behind the corporate proxy. Specified the proxy details in
Using eclipse plugin to build grade project (BuildShip)
My build.gradle
apply plugin: ‘java’

repositories {

	url "url of maven repo"


dependencies {
testCompile ‘junit:junit:4.12’


Thanks in advance

Did you even tell Gradle to look in your local Maven repository? Gradle does not do that by default.

repositories {

With local it is able to build. But if I want to download external jar from maven I am stuck…

See the answer to your other post. You are not setting proxy settings for HTTPS.

I have added https proxy settings. Still I am facing the same issue.

Getting above error