[GRADLE-1964] Provide a mechanism for caching local filesystem dependencies when access to the filesystem is slow Created: 25/Nov/11 Updated: 10/Feb/17 Resolved: 10/Feb/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Improvement | ||
Reporter: | Gradle Forums | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 4 |
Issue Links: |
|
Description |
As a part of upgrading to milestone-5, we changed the way repositories are defined. repositories { } On using FileSystemResolver dependency caching works fine. |
Comments |
Comment by Gradle Forums [ 25/Nov/11 ] |
When a dependency artifact is available on the local filesystem, it usually doesn't make sense to copy this file into the cache. The purpose of the cache is to keep a temporary copy of any artifacts that would be expensive to re-fetch: local files usually don't meet this criteria and keeping an additional copy would be wasteful. However, there are times when the filesystem is slow to access (eg a network share), and caching would be useful. Currently there is no mechanism for telling Gradle to cache the artifacts in these cases. A way to instruct Gradle to cache files from a local repository is something we'd like to add. (And perhaps a way to instruct Gradle NOT to cache files from a remote repository) |
Comment by Björn Kautler [ 09/Mar/12 ] |
This is a major flaw in my opinion.
Please add this possibility. |
Comment by Björn Kautler [ 20/Apr/12 ] |
With 1.0-rc1 using FileSystemResolver also does not cache the libraries anymore. How do I get the libraries to be cached again? |
Comment by Björn Kautler [ 21/Apr/12 ] |
Just for others if they have the same issue, I found a new workaround: repositories { add(new org.apache.ivy.plugins.resolver.ChainResolver()) { add new org.apache.ivy.plugins.resolver.FileSystemResolver() resolvers[0].identity { name = 'ivy' addIvyPattern "$publicRepoDir/ivy/$GRADLE_IVY_PATTERN" addArtifactPattern "$publicRepoDir/ivy/$GRADLE_ARTIFACT_PATTERN" checkmodified = true } } } |
Comment by Bjarne Boström [ 07/May/15 ] |
It would seem the ivy resolvers are deprecated in 2.x : https://discuss.gradle.org/t/custom-ivy-resolver-deprecation-in-gradle-2-x/7492 and the workaround posted here does not work (or maybe I failed something, I get unable to resolve class org.apache.ivy.plugins.resolver.ChainResolver). I think this feature would be important because a network shared ivyrepo is very convinient in companies. |
Comment by Björn Kautler [ 13/May/15 ] |
Bjarne Boström it is deprecated since some versions and is supposed to be removed in 2.x |
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:
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. |