Skip navigation.

configure

The configure task is used to configure ivy with an xml configuration file.

See configuration for details about the configuration file itself.

Note for developers:
After the call to this task, a reference to the configured ivy instance used by all subsequent ant tasks is put in the ant project, under the id "ivy.instance".
AttributeDescriptionRequired
filepath to the configuration file to use No. If a file is provided, url is ignored. If none are provided, then it attempts to find a file at ${ivy.conf.file}, and if this file does not exist, it uses a default configuration file
urlurl of the configuration file to use
hosthttp authentication hostNo, unless authentication is required
realmhttp authentication realm
usernamehttp authentication user name
passwdhttp authentication password

HTTP Authentication

Note: HTTP Authentication can be used only if commons-httpclient.jar is in your classpath If any of the url you use in ivy (especially in dependency resolvers) need http authentication, then you have to provide the host, realm, username and passwd attributes of the configure task. These settings will then be used in any further call to ivy tasks.

Since 1.4: It's also possible to configure authentication settings for multiple urls. This can be done with the <credentials> subelements. See the examples for more details.

Examples

Simplest configuration

<ivy:configure />
Use either ${ivy.conf.file} if it exists, or the default configuration file

Configure with a file

<ivy:configure file="myconffile.xml" />

Configure with an url

<ivy:configure url="http://mysite.com/myconffile.xml" />

Configure multiple URLs which require autentication

<ivy:configure file="path/to/my/ivyconf.xml">
  <credentials host="myhost.com" realm="My Realm" username="myuser" passwd="mypasswd" />
  <credentials host="yourhost.com" realm="Your Realm" username="myuser" passwd="myotherpasswd" />
</ivy:configure>