[GRADLE-3309] Excessive downloads during resolution Created: 23/Jun/15  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: 2.4
Fix Version/s: None

Type: Bug
Reporter: Mark Vieira (Inactive) Assignee: Unassigned
Resolution: Won't Fix Votes: 0

Issue Links:
Related to GRADLE-2582 Parallel resolution of artifacts Resolved
Related to GRADLE-3205 Parallel execution is horribly broken... Resolved


The following script unnecessarily results in Gradle downloading irrelevant snapshot version metadata when resolving the latest version. This appears to be triggered only when the jcenter() repository is included, as if excluded the expected behavior is exhibited. I cannot find any reason in the repository metadata that triggers this bug.

This is a minimalistic snippet from the gradle-versions-plugin, which uses the resolution results to report potential version upgrades. The Gradle cache effectively makes this a one time cost, but the excessive downloads and the sequential http requests (GRADLE-25822) results in a poor initial experience.

Running gradle resolve with JCenter takes 2m9s and without 6s.

import static org.gradle.api.specs.Specs.SATISFIES_ALL

repositories {
  maven { url "https://repository.apache.org/content/repositories/snapshots/" }
  maven { url "https://repository.apache.org/content/repositories/releases/" }

task resolve() {
  doFirst {
    def deps = [
      dependencies.create("org.apache.camel:camel-core:latest.milestone") {
        transitive = false
    ] as Dependency[]
    def conf = project.configurations.detachedConfiguration(deps)
    def resolved = conf.resolvedConfiguration.lenientConfiguration

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:45:25 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.