title: Couldn't find dependencies from android library that include external repository
body: <p>I created an android library and added it to a local Maven repository. When trying to add the library to other an application it couldn't find the dependency that has an external repository.</p>
  
  <p><strong>Library <code>gradle</code></strong>:</p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'realm-android'
  apply plugin: "com.tmiyamon.config"
  apply plugin: 'maven'
  
  version = "1.1"
  group = "com.myApp.lib"
  
  repositories {
      mavenLocal()
      maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
      maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' }
      maven { url 'http://mobile-sdk.jumio.com' }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
  
      debugCompile 'com.uphyca:stetho_realm:2.0.0'
      stagingCompile 'com.uphyca:stetho_realm:2.0.0'
      compile'com.squareup.picasso:picasso:2.5.3-SNAPSHOT'
      compile 'com.jumio.android:core:2.5.0@aar'
      compile 'com.jumio.android:nv:2.5.0@aar'
      compile 'com.jumio.android:nv-mrz:2.5.0@aar'
      compile 'com.jumio.android:nv-barcode:2.5.0@aar'
  }
  
  
  uploadArchives {
      repositories {
          mavenDeployer {
              repository(url: "file://${System.env.HOME}/.m2/repository/")
              pom.project {
                  repositories {
                      repository {
                          id 'oss-sonatype'
                          url "https://oss.sonatype.org/content/repositories/snapshots/"
                           snapshots {
                               enabled true
                           }
  
                      }
                      repository {
                          id 'stetho-realm'
                          url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
                      }
                      repository {
                          id 'jumio'
                          url 'http://mobile-sdk.jumio.com'
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p><strong>Project <code>build.gradle</code></strong>:</p>
  
  <pre><code>  apply plugin: 'com.android.application'
  
  repositories {
      mavenLocal()
      mavenCentral()
  }
  
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
      defaultConfig {
          applicationId "com.test.test.test"
          minSdkVersion 16
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
      dataBinding {
          enabled true
      }
  
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile "com.android.support:appcompat-v7:$rootProject.supportLibVersion"
      testCompile 'junit:junit:4.12'
      compile('com.myApp.lib:app:1.1')
  }
  </code></pre>
  
  <p><strong>Project Top Level Gradle</strong>:</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
          maven {
              url "https://plugins.gradle.org/m2/"
          }
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.2.3'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  
  
  ext {
      supportLibVersion = "25.3.1"
  }
  </code></pre>
  
  <p><strong>Library POM file</strong>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;com.myApp.lib&lt;/groupId&gt;
    &lt;artifactId&gt;app&lt;/artifactId&gt;
    &lt;version&gt;1.1&lt;/version&gt;
    &lt;packaging&gt;aar&lt;/packaging&gt;
    &lt;dependencies&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;io.realm&lt;/groupId&gt;
        &lt;artifactId&gt;realm-annotations&lt;/artifactId&gt;
        &lt;version&gt;2.3.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;io.realm&lt;/groupId&gt;
        &lt;artifactId&gt;realm-android-library&lt;/artifactId&gt;
        &lt;version&gt;2.3.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
        &lt;groupId&gt;com.squareup.picasso&lt;/groupId&gt;
        &lt;artifactId&gt;picasso&lt;/artifactId&gt;
        &lt;version&gt;2.5.3-SNAPSHOT&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.jumio.android&lt;/groupId&gt;
        &lt;artifactId&gt;core&lt;/artifactId&gt;
        &lt;version&gt;2.5.0&lt;/version&gt;
        &lt;type&gt;aar&lt;/type&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;*&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.jumio.android&lt;/groupId&gt;
        &lt;artifactId&gt;nv&lt;/artifactId&gt;
        &lt;version&gt;2.5.0&lt;/version&gt;
        &lt;type&gt;aar&lt;/type&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;*&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.jumio.android&lt;/groupId&gt;
        &lt;artifactId&gt;nv-mrz&lt;/artifactId&gt;
        &lt;version&gt;2.5.0&lt;/version&gt;
        &lt;type&gt;aar&lt;/type&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;*&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.jumio.android&lt;/groupId&gt;
        &lt;artifactId&gt;nv-barcode&lt;/artifactId&gt;
        &lt;version&gt;2.5.0&lt;/version&gt;
        &lt;type&gt;aar&lt;/type&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;*&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
        &lt;groupId&gt;com.facebook.stetho&lt;/groupId&gt;
        &lt;artifactId&gt;stetho&lt;/artifactId&gt;
        &lt;version&gt;1.4.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.facebook.stetho&lt;/groupId&gt;
        &lt;artifactId&gt;stetho-okhttp3&lt;/artifactId&gt;
        &lt;version&gt;1.4.2&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;com.uphyca&lt;/groupId&gt;
        &lt;artifactId&gt;stetho_realm&lt;/artifactId&gt;
        &lt;version&gt;2.0.0&lt;/version&gt;
        &lt;scope&gt;compile&lt;/scope&gt;
        &lt;exclusions&gt;
          &lt;exclusion&gt;
            &lt;artifactId&gt;*&lt;/artifactId&gt;
            &lt;groupId&gt;org.apache.oltu.oauth2&lt;/groupId&gt;
          &lt;/exclusion&gt;
        &lt;/exclusions&gt;
      &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;repositories&gt;
      &lt;repository&gt;
        &lt;snapshots&gt;
          &lt;enabled&gt;true&lt;/enabled&gt;
        &lt;/snapshots&gt;
        &lt;id&gt;oss-sonatype&lt;/id&gt;
        &lt;url&gt;https://oss.sonatype.org/content/repositories/snapshots/&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
        &lt;id&gt;stetho-realm&lt;/id&gt;
        &lt;url&gt;https://github.com/uPhyca/stetho-realm/raw/master/maven-repo&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
        &lt;id&gt;jumio&lt;/id&gt;
        &lt;url&gt;http://mobile-sdk.jumio.com&lt;/url&gt;
      &lt;/repository&gt;
    &lt;/repositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>But when I try to compile the application project I get:</p>
  
  <blockquote>
    <p>Failed to resolve: com.jumio.android:nv:2.5.0 and all the rest of the dependencies from those repositories:</p>
    
    <p>maven { url "<a href="https://oss.sonatype.org/content/repositories/snapshots/" rel="nofollow noreferrer">https://oss.sonatype.org/content/repositories/snapshots/</a>" }</p>
    
    <p>maven { url '<a href="https://github.com/uPhyca/stetho-realm/raw/master/maven-repo" rel="nofollow noreferrer">https://github.com/uPhyca/stetho-realm/raw/master/maven-repo</a>' }</p>
    
    <p>maven { url '<a href="http://mobile-sdk.jumio.com" rel="nofollow noreferrer">http://mobile-sdk.jumio.com</a>' }</p>
  </blockquote>
  
  <p>even though I can see all those repositories in the POM file.</p>