Saturday, February 6, 2010

Common local repository location for spring-build ivy artifacts

SpringFramework in version 3 came out with a common ant + ivy build system across most of the projects.
One thing that was driving me insane is that this build would pull artifacts into a project specific repository directory during ivy resolution vs. a common directory (like maven). As I was playing with the different projects and different versions of those projects disk usage was going through the roof.

The only way that I found to have a common location is to provide a -D flag to ant:

export ANT_OPTS="-Divy.cache.dir=$HOME/.spring-build-ivy-cache"


Single location, minimize disk usage. But there is always a but in there somewhere. dm-server code base for one makes some assumptions about where that repository is located, i.e. "../ivy-cache/repository/[artifact]". I ended up creating a symbolik link for those situations. Not the best solutions but freed about 1G of space on my machine.

No comments: