mirror of https://github.com/apache/ant-ivy
79 lines
4.8 KiB
HTML
79 lines
4.8 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
<html>
|
|
<head>
|
|
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
|
|
<script type="text/javascript">var xookiConfig = {level: 1};</script>
|
|
<script type="text/javascript" src="../xooki/xooki.js"></script>
|
|
</head>
|
|
<body>
|
|
<textarea id="xooki-source">
|
|
The configure task is used to configure ivy with an xml settings file.<br/><br/>
|
|
See [[settings]] for details about the settings file itself.<br/><br/>
|
|
|
|
<span class="since">since 2.0</span> 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.
|
|
|
|
<span class="since">since 2.0</span> It is also possible to configure Ivy with the [[ant: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.
|
|
|
|
<table class="ant">
|
|
<thead>
|
|
<tr><th class="ant-att">Attribute</th><th class="ant-desc">Description</th><th class="ant-req">Required</th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr><td>settingsId</td><td>The settings id useable in the settingsRef attributes of the ivy task that needs a setting. Note that the ivy tasks will search by default for the settings with the id "ivy.instance", which is the default value.</td><td>No, defaults to "ivy.instance"</td></tr>
|
|
<tr><td>file</td><td>path to the settings file to use</td>
|
|
<td rowspan="2">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 ${ivy.settings.url} <span class="since">(since 2.3)</span> or a <a href="../samples/ivysettings-default.xml">default settings file</a></td></tr>
|
|
<tr><td>url</td><td>url of the settings file to use</td></tr>
|
|
<tr><td>override</td><td>Specify what to do when another settings with the same id has already been loaded.<ul><li>true</li> the current settings will take precedence over any previously defined setting with this id<li>false</li> the current settings will not override a previously defined setting with this id<li>notallowed</li>an error is raised if a settings has already been defined with this id</ul></td><td>No, defaults to "notallowed"</td></tr>
|
|
<tr><td>host</td><td>http authentication host</td><td rowspan="4">No, unless authentication is required</td></tr>
|
|
<tr><td>realm</td><td>http authentication realm</td></tr>
|
|
<tr><td>username</td><td>http authentication user name</td></tr>
|
|
<tr><td>passwd</td><td>http authentication password</td></tr>
|
|
</tbody>
|
|
</table>
|
|
<h2>HTTP Authentication</h2>
|
|
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.<br/><br/>
|
|
|
|
<b>Since 1.4:</b>
|
|
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.
|
|
|
|
<h2>Examples</h2>
|
|
<h3>Simplest settings</h3>
|
|
<code><ivy:configure /></code>
|
|
Use either ${ivy.settings.file} if it exists, or the <a href="../samples/ivysettings-default.xml">default settings file</a>
|
|
<h3>Configure with a file</h3>
|
|
<code><ivy:configure file="myconffile.xml" /></code>
|
|
<h3>Configure with an url</h3>
|
|
<code><ivy:configure url="http://mysite.com/myconffile.xml" /></code>
|
|
<h3>Configure multiple URLs which require autentication</h3>
|
|
<code>
|
|
<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>
|
|
</code>
|
|
</textarea>
|
|
<script type="text/javascript">xooki.postProcess();</script>
|
|
</body>
|
|
</html>
|