Ivy: how to download dependencies to different folders

less than 1 minute read

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 download 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

We need three different things to achieve our goal:

The first step is defining in your ivy.xml a configuration for each folder:

Then we need to define the actual dependencies assigning to each one the right configuration(in this scenario both are extending the default one):

Finally we need to define the pattern in the ivy:retrieve tag

Updated: