- Home
- Download
- Documentation (2.0.0-beta1)
- History
- Trunk
- 2.x
- 2.0.x
- 2.0.0-beta1
- 2.0.0-alpha2
- 2.0.0-alpha-1
- 2.0.x
- 1.x
- 0.x
- Get Involved
- Search
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.
Attribute | Description | Required |
---|---|---|
file | path 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 |
url | url of the settings file to use | |
host | http authentication host | No, unless authentication is required |
realm | http authentication realm | |
username | http authentication user name | |
passwd | http authentication password |
HTTP Authentication
Note: HTTP Authentication can be used only if commons-httpclient.jar is in your classpathIf 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
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>