Getting started with Gradle/Ivy and populating a new Repository


(david.ishee) #1

I’m not sure how to get started with Gradle and use an Ivy repository. I’m starting from scratch and haven’t used either one before. Do I need to install Ivy by itself first? I want to start populating a new repository. Should I use Gradle to do that or build it in Ivy first? Any advice or recommendations when starting from scratch?

(The docs seem to assume you know Ivy already and want to hook into an existing repository)

David


#2

Do you want to publish your Gradle-generated artifacts to the ivy repository? Or are you trying to configure third-party artifacts to be available?

For the former, I’d recommend checking the user guide (chapters 6,7,37) and some samples (java/quickstart,ivypublish).

For the latter, why not try using mavenCentral() instead. This will save you a lot of work just to get up and running.


(david.ishee) #3

I’d mainly like to publish Gradle-generated artifacts to an Ivy repository (if that is the best option). I have some 3rd party libs I could put in there too, but I’m willing to do that manually and not pull them off the Internet.


(Peter Niederwieser) #4

All you need to set up a shared Ivy repository is a server with a file system that can be accessed from client machines (e.g. via HTTP and/or SSH). But I’d recommend to use a repository manager like Artifactory. It’s easier to get started and a good choice anyway.

I wouldn’t say that an Ivy repository is a better option than a Maven repository. It’s a more powerful option, but the power comes at a price. And typically, most of your third-party dependencies will come from Maven repositories anyway. Again you can’t go wrong with Artifactory, which can act both as an Ivy and a Maven repository.