0
votes

Ivy can be surprisingly confusing given the amount of documentation out there. Here's what I find confusing this hour about Ivy:

The Main Concepts page explains about caches.

The Adjusting default settings tutorial explains the local repository.

If I have both a local cache and a local repository why would I also need a File System Resolver? Do I need that so the local repository or cache is used by Ivy?

If not, it appears the way a file system resolver works is first I would download and organize all the dependencies and the transitive dependencies. I then point the file system resolver to these files. Ivy would then read from my filesystem and copy the files into a local repository and cache.

I'm sure I don't understand this correctly - this seems awfully clunky. I'd appreciate any illumination on the difference between the local repository, cache, and the local a file system resolver points to.

1
I personally don't used ivy repositories (local or otherwise). Instead I publish my artifacts into Nexus (a Maven repository manager). That way my files are shared with other build technologies like Maven AND I have software to manage the repo for me.Mark O'Connor

1 Answers

0
votes

kwell first, repositories and caches are two different functional concepts.

Repositories, local, FileSystem or URL, is the place where the artifacts are being saved and for the most part, shared as well.

"public" repositories hold artifacts and provide them. Nexus or artifactory are examples of repositories that cache a copy of the artifacts from public repositories and usually are named "shared" repositories.

"local" repositories are, for the most part, FileSystem Repositories. They provide artifacts (where these artifacts come from will come later) as well, and those artifacts exist in your file system.

Now, any artifact your project is resolving will be put in the cache, regardless of the source (FileSystem, URL, iBiblio).

One of the straight-forward reasons, to me, is to have a universal behavior on the artifacts after retrieving them (bringing them from their original location).

The cache is on your machine file system and it holds information regarding the origin of each artifact and the time or resolution. Any operation will take place upon the artifacts (building a classpath, or copying them from one place to another "retrieve") will be executed on the artifacts in the cache.

Hope this little bit helps.

To answer the question (I asked) regarding Local Repository; The Local Repository is filled with artifacts that your projects produce, such as the SNAPSHOTs that a project-A produces and will be used in project-B. They are not releases and usually temporary.

Finally, The Local Repository is a FileSystem repository, but not all FileSystem are local repositories. From the top of my head, I could thing of a shared repository (to share artifacts within the team) that is on a FileSystem accessible to all and not to use Nexus (which is a URL resolver).