Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running unit tests results in repository lookup loop #1946

Closed
mttkay opened this issue Jul 16, 2015 · 4 comments
Closed

Running unit tests results in repository lookup loop #1946

mttkay opened this issue Jul 16, 2015 · 4 comments

Comments

@mttkay
Copy link

mttkay commented Jul 16, 2015

When trying to run the unit tests using mvn, the tests for shadows-core will result in an infinite lookup loop for a snapshot JAR:

[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Unable to locate resource in repository
[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Unable to locate resource in repository
[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Unable to locate resource in repository
[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Unable to locate resource in repository
[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
Unable to locate resource in repository
[INFO] Unable to find resource 'org.robolectric:shadows-core:jar:16:3.1-SNAPSHOT' in repository sonatype (https://oss.sonatype.org/content/groups/public/)
Downloading: org/robolectric/shadows-core/3.1-SNAPSHOT/shadows-core-3.1-SNAPSHOT-16.jar from repository sonatype at https://oss.sonatype.org/content/groups/public/
...

It just repeats indefinitely from here on.

Any ideas? I've never seen that happening before with any Maven setup or project I've used, so I suspect it's related to RL somehow.

@erd
Copy link
Member

erd commented Jul 20, 2015

Does it get stuck in a loop if you build via scripts/install-robolectric.sh?

@mttkay
Copy link
Author

mttkay commented Jul 25, 2015

Ah right--I tried that too but it fails with a different error:

[INFO] ------------------------------------------------------------------------
[INFO] Building shadows-maps 3.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/com/google/android/maps/maps/18_r4/maps-18_r4.pom
[WARNING] The POM for com.google.android.maps:maps:jar:18_r4 is missing, no dependency information available
Downloading: https://repo.maven.apache.org/maven2/com/google/android/maps/maps/18_r4/maps-18_r4.jar
...
[ERROR] Failed to execute goal on project shadows-maps: Could not resolve dependencies for project org.robolectric:shadows-maps:jar:3.1-SNAPSHOT: Could not find artifact com.google.android.maps:maps:jar:18_r4 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

This is the proprietary Maps API yes? Should I deploy this manually to my local Maven cache first?

@erd
Copy link
Member

erd commented Jul 27, 2015

Yes. If you run scripts/install-dependencies.sh it will mavenize all the required libraries from the SDK.

@erd
Copy link
Member

erd commented Oct 14, 2015

We have a bit of a non-standard Maven setup, so you'll need to run install-dependencies.rb before building the code, and the first time you build everything, you need to run install-robolectric.sh. After that you can get away with building / installing only the pieces that you need. We've tried to document the process in the README. Let me know if there are things that could be improved.

@erd erd closed this as completed Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants