Ivy is a dependency manager that lets you define in a declarative way directly in the build file the dependency of your project. In order to downlaod dependencies in different folders (i.e. separate the runtime dependencies from the testing ones) you have to define configurations. Let's say we have this project structure: /lib -prod -test The first step is defining in your ivy.xml a configuration for each folder: <configurations> <conf name=\"test\" visibility=\"public\" description=\"test dependencies\" /> <conf name=\"prod\" visibility=\"public\" description=\"runtime dependencies\" /> </configurations> and then defining the actual dependencies assigning to each one the right configuration(in these scenario all are extending the default one): <dependencies> <dependency org=\"org.apache\" name=\"junit\" rev=\"2.0\" conf=\"test->default\"/> <dependency org=\"org.apache\" name=\"log4j\" rev=\"2.0\" conf=\"prod->default\"/> </dependencies> Finally in the build file you have to define the pattern in the ivy:retrieve tag: <ivy:retrieve pattern=\"$ {ivy.lib.dir}/[conf]/[artifact].[ext]\"/> is easy to see that the pattern chunk that defines the actual destination directory id the [conf] token.