configure


(since 2.0) the configure task is deprecated. Use the setting declaration
The configure task is used to configure ivy with an xml settings file.

See settings for details about the settings 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".


since 2.0 The file loaded used to be called configuration file in versions prior to 2.0. The name 'settings' and the use of the ivy.settings.file is new to 2.0.
AttributeDescriptionRequired
filepath to the settings 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.settings.file}, and if this file does not exist, it uses a default settings file
urlurl of the settings 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 subelements. See the examples for more details.

Examples

Simplest settings

<ivy:configure />
Use either ${ivy.settings.file} if it exists, or the default settings 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/ivysettings.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>