views:

287

answers:

2

we use Gradle for building Java projects and at the moment we have Ivy repositories to store third-party artifacts and also to publish our own artifacts into (repo is build using Gant scripts and the Ivy ANT tasks). but repo management is basic.
Gradle is able to work with a maven repo as well, so switching to a Maven artifact manager like Archiva or Nexus is an option, but perhaps unnecessary. do you know any tools or best practices than can help us in building and maintaining Ivy repos?

just to be clear: we have already read the tutorials and more and understand how to do it, but it's still basic to maintain.

A: 

In my opinion there isn't much in Ivy's repository to work with because it just works. What you can't do with Ivy's Ant tasks you can do directly from the file system, simple as that.

Admittedly something like changing the artefact name can be difficult but then again that's something you shouldn't do anyway.

Esko
how do you deal with the fact that most libraries don't ship an ivy.xml descriptor? write yourself, convert from maven and strip off the cruft, ... i have a feeling i'm wasting time maintaining artifacts while i shouldn't
Stefan De Boey
We usually convert base from Maven *(if available)*, see if it's good enough and tune if needed. Usually the Maven base has extra dependencies which need to be looked through but as is the generated base artifacts have worked decently so far.
Esko
+1  A: 

In the past, I've only used an ivy repository for small private repositories publishing artifacts using simple low level protocols like an FTP site. (All the site needs is a versioned directory layout and an ivy.xml file describing the arifacts)

The maven based repository infrastructure is now so pervasive, with some many projects using it, it's almost pointless to promote an alternative repository management standard.

Sonatype (company behind Maven) make their repository product, Nexus, available to all, because it's in everyone's interest to keep the band-width requirements to Maven central under control.

Thankfully, ivy plays nice with Maven meaning you can take advantage of the best of both worlds.

Mark O'Connor