1

I have these lines in my app-level build.gradle

repositories {
mavenLocal()
mavenCentral()
maven { url 'https://maven.google.de' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

it seems like the second maven repo is ignored this are my dependencies:

dependencies {
//...

implementation 'com.github.kittinunf.fuel:fuel-android:1.12.0'
implementation 'com.seatgeek:placesautocomplete:0.2-SNAPSHOT'
}

fuel is loaded but it seems like gradle looks for placesautocomplete under Maven

this is the error I get:

Error:org.gradle.api.resources.ResourceException: 
Unable to load Maven meta-data from https://maven.google.de/com/seatgeek/placesautocomplete/0.2-SNAPSHOT/maven-metadata.xml.

can anyone please explain how to force gradle to look for placesautocomplete under Nexus Repository Manager ?

parik
  • 2,313
  • 12
  • 39
  • 67
el_denko
  • 41
  • 7
  • Gradle should try both repositories and should show in the console which URLs it is attempting. If it can't find in either the error will report the first repository it tried. Is there more to the exception message? Are you sure the URL is correct? (can you hit it in your browser) – lance-java Mar 08 '18 at 11:05
  • thanks for that thought, but i think it does not even get to the second repo. when i switch the lines the error refers to the fuel-libary – el_denko Mar 08 '18 at 11:25
  • I scanned the output of the debugger but there is no appearence of 'sonatype' – el_denko Mar 08 '18 at 11:26
  • try a current version `0.3-SNAPSHOT` of [repo](https://github.com/seatgeek/android-PlacesAutocompleteTextView) – anatoli Mar 08 '18 at 11:58
  • thank you but still no difference – el_denko Mar 08 '18 at 12:01
  • Gradle might have cached the "repository miss" so it won't try again. Try deleting dirs under `\.gradle` (might need to `gradle --stop` first) then try again. You should then see gradle attempt both URLs. Also use `--console=plain` so all logging is visible – lance-java Mar 08 '18 at 13:38

1 Answers1

0

The most likely reason of the behaviour you experience is that https://maven.google.de is not a valid Maven URL. According to my quick tests, it is not even a valid DNS name.

And that's what prevents Gradle from moving forward to the next repo.

Louis Jacomet
  • 13,661
  • 2
  • 34
  • 43