Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2948

How can I force caching of dependencies from a file-based repo?

    Details

    • Type: Task
    • Status: Resolved
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Gradle Forums topic Reference:

      Description

      My project has dependencies to a maven repo which is mounted to my file system and referenced using a file URL:

      repositories {
      maven {
      url 'file:/Volumes/Repos/maven.repo/'
      }
      mavenCentral()
      }

      When I build the project, the dependencies from mavenCentral are cached locally, which allows me to work offline after I built the project once before.

      Unfortunately, the dependencies from the file-based repo are not cached. So my build breaks when I try to run it at home where "/Volumes/Repos" is not mounted.

      Can I force gradle to cache dependencies from my file-based repo?

      I would like to do something like that:

      repositories {
      maven {
      url 'file:/Volumes/Repos/maven.repo/'
      useCache true
      }
      mavenCentral()
      }

        Issue Links

          Activity

          Hide
          forums Gradle Forums added a comment -

          As far as I know, artifact caching isn't supported for file-based repositories.

          Show
          forums Gradle Forums added a comment - As far as I know, artifact caching isn't supported for file-based repositories.
          Hide
          forums Gradle Forums added a comment -

          OK. Can I turn this question into a feature request?

          Or is there any workaround? E.g. adding a task which copies the dependencies to the local maven repo (~/.m2)?

          Show
          forums Gradle Forums added a comment - OK. Can I turn this question into a feature request? Or is there any workaround? E.g. adding a task which copies the dependencies to the local maven repo (~/.m2)?
          Hide
          bmuschko Benjamin Muschko added a comment -

          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!

          Show
          bmuschko Benjamin Muschko added a comment - 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!
          Hide
          bmuschko Benjamin Muschko added a comment -

          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.

          Show
          bmuschko Benjamin Muschko added a comment - 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.

            People

            • Assignee:
              Unassigned
              Reporter:
              forums Gradle Forums
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development