By default Ivy installs a "local cache" under your <HOME>/.ivy2
directory. But if I decide to "host" a local repository on the same machine, say, at <HOME>/workbench/ivy/
, then how are these two concepts different? Isn't a cache the same thing as an artifact repository?
In a nutshell, the ivy cache is designed to improve performance, it's not meant to be the definitive copy of the files a build depends on. One never publishes to the cache. This is what an ivy repository is used for.
A local repository is a private repository of a user. It is very useful in case a user is using a library whose version has been changed on other places and have breaking changes. In case of local repository, ivy will use the library present in the local if found and will not look into public or shared repositories.
The Ivy settings file: ivysettings. xml is used to configure resolution and deployment of artifacts using repositories in Artifactory. The Ivy modules file: ivy. xml is where the project's modules and dependencies are declared.
When the dependency module has been found, its ivy file is downloaded to the ivy cache. Then ivy checks if the dependency module has dependencies, in which case it recursilvely traverses the graph of dependencies. All over this traversal, conflict management is done to prevent access to a module as soon as possible.
The concepts page describes the function of the ivy cache and the kinds of file it contains:
http://ant.apache.org/ivy/history/latest-milestone/concept.html
In a nutshell, the ivy cache is designed to improve performance, it's not meant to be the definitive copy of the files a build depends on. One never publishes to the cache. This is what an ivy repository is used for.
Additonal notes:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With