How to fail build in case some repository is not available

(Vitaly Gorbunov) #1

We have maven repository from google cloudstorage that authorized with cloudstorage token.
It’s first repository in the list, because it contains ojdbc jar (maven central contains only pom for this artifact)

The problem is that if token is invalid - build won’t fail immediately. Instead dependency resolution will be really slow, I guess because it tries cloudstorage first. In the end it gives the following error

06:38:09 > Could not resolve all dependencies for configuration ':ts-back:compile'.
06:38:09    > Could not find ojdbc14.jar (
06:38:09      Searched in the following locations:

My question is how to determine on early stage that access to cloudstorage has failed and to fail build with some user-friendly message.

(Vitaly Gorbunov) #2

Does anyone have any ideas?