Settings Files

In order to work as you want, ivy sometimes needs some settings. Actually, ivy can work with no specific settings at all, see the default settings documentation for details about that. But ivy is able to work in very different contexts. You just have to configure it properly.

Settings are specified through an xml file, usually called ivysettings.xml. To configure ivy from ant, you just have to use the settings datatype with the path of your settings file.

Mainly, the settings enable you to configure the default cache directory used by ivy and the dependency resolvers that it will use to resolve dependencies.Note: To work, this settings file needs a property file named ivysettings-file.properties in the same directory as the settings file, with ivy variables you want in it.

Some useful variables are available in settings files:

ivy.settings.dir

this variable references the directory in which the ivysettings itself is. This is available if the settings has been loaded as a file. In case of a URL, it takes the part before the last slash of the URL, if any. If the URL has no slash, then this variable is not set.

ivy.settings.file

the path of the settings file itself if it has been loaded as a file only. If it has been loaded as a URL, this variable is not set

ivy.settings.url

the URL pointing to the settings file. This is set both when it has been loaded as a file or a URL

Settings file structure

The settings file is structured in some parts and left open in others. Indeed, each resolver has its own structure, thus it's not the settings file itself which defines the structure for the resolvers.