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

Infinite resolution in Gradle for snapshot dependency #1251

Closed
ben-manes opened this issue Mar 29, 2017 · 5 comments
Closed

Infinite resolution in Gradle for snapshot dependency #1251

ben-manes opened this issue Mar 29, 2017 · 5 comments

Comments

@ben-manes
Copy link

The icafe project uses the jitpack convention but only releases snapshot versions to Sonatype's repository. When compiling Gradle is able to resolve the jar.

Unfortunately when using dependencyUpdates to query for potential upgrades, the metadata query gets stuck. The build loops forever and outputs to the debug log statements like,

02:05:38.498 [DEBUG] [org.apache.http.impl.execchain.MainClientExec]
Executing request GET /com/github/dragon66/icafe/index.html?building=8 HTTP/1.1

where the building=N gradually increases but no timeout occurs. The short-term workaround is to remove jitpack prior to running the task, but its a surprising side effect.

@jitpack-io
Copy link
Member

Having a look.
Interesting that it tries to get index.html. Shouldn't it be looking for maven-metadata.xml?

@ben-manes
Copy link
Author

ben-manes commented Mar 29, 2017

I think it queries the directory and receives a redirect. The directory query would let it distinguish between ivy, maven, etc though that is known by the repository type. The blocking of directory queries by the plugin portal is why plugin versions can't be resolved so Gradle does it first, for some reason.

@Mathbl
Copy link

Mathbl commented Apr 2, 2017

I'm also encountering that issue. I'm not sure what changed on my side, but since a couple of days, dependencyUpdates gets stuck everytime. At first, I thought there was a problem with one of my dependency that uses jitpack, but they build correctly when I check on the jitpack website.

I tried removing the dependency that was causing the infinite resolution, but then, the next one doesn't resolve either.

@ben-manes
Copy link
Author

@Mathbl You can remove jitpack from dependencyUpdates without effecting your build, e,g.

repositories {
  maven { name 'jitpack'; url 'https://jitpack.io' }
}
tasks.dependencyUpdates.doFirst {
  repositories.removeAll { it.name == 'jitpack' }
}

The plugin is using Gradle to handle the resolution (effectively + with a pretty report). So problems tend to be either Gradle or repository bugs, since the plugin is just the glue logic.

@Mathbl
Copy link

Mathbl commented Apr 3, 2017

@ben-manes Indeed! Thanks for the trick, that'll do it for now. Still not sure about the cause of the sudden issue with resolving from jitpack, but I'll subscribe to this issue and see how it goes. Thanks again.

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

3 participants