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 (com.oracle:ojdbc14:10.2.0.3.0).
06:38:09      Searched in the following locations:
06:38:09          https://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.3.0/ojdbc14-10.2.0.3.0.jar

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

bump.
Does anyone have any ideas?