2

I am starting new with Ivy.

I have a local Git Repo where i store my jars. I use Ant for builds.

Which resolver can i use with Git and Ivy, in Ant. What setting are required to achieve this.

Mark O'Connor
  • 76,015
  • 10
  • 139
  • 185
Linus
  • 880
  • 13
  • 25
  • See [here](http://ant.apache.org/ivy/history/2.1.0/tutorial.html) – SMA Feb 01 '15 at 16:56
  • Already checked there. Could not find anything about Git Resolver – Linus Feb 01 '15 at 17:01
  • possible duplicate of [Ivy Custom Resolvers for Git or TFS](http://stackoverflow.com/questions/9294996/ivy-custom-resolvers-for-git-or-tfs) – Mark O'Connor Feb 01 '15 at 21:29
  • If you're storing jars within your GIT project, you could use the file system resolver. Here's an example: http://stackoverflow.com/questions/10175000/sample-example-which-explain-how-to-use-filesystem-resolver/10180491#10180491 – Mark O'Connor Feb 01 '15 at 21:33

1 Answers1

4

Ivy can use Ivy repos or Maven repos. These have a special layout, and not someplace where you can simply store random jar files. It might be possible to use Github, but I doubt it's your best solution.

Your best solution is to use your own Maven repository such as JFrog's Artifactory, Sonatype's Nexus, or Apache's Archiva. These repository managers can point to multiple other Maven/Ivy repositories and retrieve jars you may need from them too. Instead of just your local jars, you can use the entire worldwide set of Maven managed jars. All you have to do is set your configuration to point to your local Maven repository manager and let it handle the rest.

All of these repository managers come in open source versions. The main drawback is that you need a server to put them on. However, Sonatype offers free Maven repository hosting for OSS projects.

Community
  • 1
  • 1
David W.
  • 105,218
  • 39
  • 216
  • 337
  • We want to use a Jar generated by another project within the company. and stored in their GIT. They will be generating their jar and storing it in GIT. My project reuses that and Builds on top of that. – Linus Feb 05 '15 at 09:34
  • 1
    That's what Nexus and Artifactory are for. You can store your local jars there, and still get access to them. Both have free open source versions (and paid supported versions), but you do need a server. Do you use Ivy for all of your jars? All you need to do is setup your `ivysettings.xml` to point to your local Maven repository server, and you can retrieve both your locally built jars and the _open source_ ones you use. – David W. Feb 05 '15 at 13:58