Sometimes my maven repo contains only poms without jars. In this case gradle/ivy rises exception and stops building:
* What went wrong:
Could not resolve all dependencies for configuration ':core:compile'.
> Artifact 'ch.qos.logback:logback-classic:1.0.6@jar' not found.
There is repos that have this jar file. Why gradle doesn't check other project repos and stops building? How can tell gradle to check other repos in this case?
added:
to solve this problem (Artifact 'ch.qos.logback:logback-classic:1.0.6@jar' not found.
) I just delete logback-classic
folder from my maven local repo. Then gradle will download pom/jar from other linked repositories.
By default, Gradle will always take POM and artifacts from the same Maven repository. And since it treats the local Maven repository as just another Maven repository, this is the behavior you get. To make it look for artifacts in other repositories, you can use repositories { maven { url "..."; artifactUrls "...", "..." } }
. For mavenLocal
and mavenCentral
, the syntax is mavenLocal(artifactUrls: ["...", "..."])
.