Multiple repositories: Ignore missing artifacts

Hi!

My build.gradle script (https://gist.github.com/hastebrot/8064838) throws following exception after running a task with ‘“gradle depsRuntime”’.

* What went wrong:
Could not resolve all dependencies for configuration ':runtime'.
> Could not download artifact 'javax.media:jai_core:1.1.3:jai_core.jar'
   > Artifact 'javax.media:jai_core:1.1.3:jai_core.jar' not found.

The jar file ‘jai_core-1.1.3.jar’ is missing in maven central (http://central.maven.org/maven2/javax/media/jai_core/1.1.3/) but existent on the geotools repository (http://download.osgeo.org/webdav/geotools/javax/media/jai_core/1.1.3/).

I changed the order of repository so that osgeo-repository is on the top, and it helped. However:

  • Is there a way to tell Gradle to check the other repositories first and then throw an exception if the requested dependency is not found? * Why do artifacts vanish in the repositories (‘jai_core-1.1.3.jar’ is missing in maven central) and how to reupload them again?

Thanks, Benjamin

You can set further repos to search for with ‘MavenArtifactRepository#artifactUrls(Object… urls)’. Chances are the artifacts haven’t vanished from Maven Central but were never uploaded (e.g. for licensing reasons).

Thanks, Peter. This answers my questions.