- Documentation (2.5.1-local-20221102182706)
- Release Notes
- Tutorials
- Reference
- Introduction
- Settings Files
- Ivy Files
- Ant Tasks
- artifactproperty
- artifactreport
- buildlist
- buildnumber
- buildobr
- cachefileset
- cachepath
- checkdepsupdate
- cleancache
- configure
- convertmanifest
- convertpom
- deliver
- dependencytree
- findrevision
- fixdeps
- info
- install
- listmodules
- makepom
- post resolve tasks
- publish
- report
- repreport
- resolve
- resources
- retrieve
- settings
- var
- Using standalone
- OSGi
- Developer doc
configure
The configure
task is used to configure Ivy with a settings XML file.
See Settings Files for details about the settings file itself.
[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.
It is also possible to configure Ivy with the settings declaration. The difference with this task is that when using the settings declaration, the configuration of Ivy will be done when the settings are first needed (for instance, when you do a resolve), while the configure task will perform a configuration of Ivy instantly, which makes it easier to see the problem if something goes wrong.
Attributes
Attribute | Description | Required |
---|---|---|
settingsId |
The settings id usable in the |
No, defaults to |
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 |
url |
URL of the settings file to use |
|
override |
Specify what to do when another settings with the same id has already been loaded. |
No, defaults to |
host |
HTTP authentication host |
No, unless authentication is required |
realm |
HTTP authentication realm |
|
username |
HTTP authentication user name |
|
passwd |
HTTP authentication password |
HTTP Authentication
If any of the URLs you use in Ivy (especially in dependency resolvers) needs 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 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 authentication
<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>