blob: 7f978b8d00a3c7c04894875a9ae079497c8cb67c [file] [log] [blame]
<!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: 0};</script>
<script type="text/javascript" src="xooki/xooki.js"></script>
</head>
<body>
<textarea id="xooki-source">
In order to work as you want, ivy sometimes needs some settings. Actually, ivy can work with no specific settings at all, see the <a href="tutorial/defaultconf.html">default settings documentation</a> for details about that. But ivy is able to work in very different contexts. You just have to configure it properly.
Settings are specified through an xml file, usually called ivysettings.xml. To configure ivy from ant, you just have to use the [[ant:settings]] datatype with the path of your settings file.
Here is an example of the settings file:
<code type="xml">
<ivysettings>
<properties file="${ivy.settings.dir}/ivysettings-file.properties" />
<settings defaultResolver="ibiblio" />
<caches defaultCacheDir="${cache.dir}" checkUpToDate="false" />
<resolvers>
<ibiblio name="ibiblio" />
<filesystem name="internal">
<ivy pattern="${repository.dir}/[module]/ivy-[revision].xml" />
<artifact pattern="${repository.dir}/[module]/[artifact]-[revision].[ext]" />
</filesystem>
</resolvers>
<modules>
<module organisation="jayasoft" name=".*" resolver="internal" />
</modules>
</ivysettings>
</code>
<br/>
Mainly, the settings enable you to configure the default cache directory used by ivy and the dependency resolvers that it will use to resolve dependencies.
<i>Note: To work, this settings file needs a property file named ivysettings-file.properties in the same directory as the settings file, with ivy variables you want in it.</i>
Some useful variables are available in settings files:
<ul>
<li>ivy.settings.dir</li> this variable references the directory in which the ivysettings itself is. This is available if the settings has been loaded as a file. In case of a URL, it takes the part before the last slash of the URL, if any. If the URL has no slash, then this variable is not set.
<li>ivy.settings.file</li> the path of the settings file itself if it has been loaded as a file only. If it has been loaded as a URL, this variable is not set
<li>ivy.settings.url</li> the URL pointing to the settings file. This is set both when it has been loaded as a file or a URL
</ul>
<span class="since">since 1.4</span> Note that all <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/System.html#getProperties()">java system properties</a> are available as ivy variables in your settings file.
<h1>Settings file structure</h1>
The settings file is structured in some parts and left open in others. Indeed, each resolver has its own structure, thus it's not the settings file itself which defines the structure for the resolvers.
<pre>
ivysettings
<a href="settings/property.html">property</a>
<a href="settings/properties.html">properties</a>
<a href="settings/settings.html">settings</a>
<a href="settings/include.html">include</a>
<a href="settings/classpath.html">classpath</a>
<a href="settings/typedef.html">typedef</a>
<a href="settings/credentials.html">credentials</a>
<a href="settings/lock-strategies.html">lock-strategies</a>
<a href="settings/caches.html">caches</a>
<a href="settings/caches/cache.html">cache</a>
<a href="settings/latest-strategies.html">latest-strategies</a>
<a href="settings/version-matchers.html">version-matchers</a>
<a href="settings/triggers.html">triggers</a>
<a href="settings/parsers.html">parsers</a>
<a href="settings/conflict-managers.html">conflict-managers</a>
<a href="settings/outputters.html">outputters</a>
<a href="settings/namespaces.html">namespaces</a>
<a href="settings/namespace.html">namespace</a>
<a href="settings/namespace/rule.html">rule</a>
<a href="settings/namespace/fromtosystem.html">fromsystem</a>
<a href="settings/namespace/src.html">src</a>
<a href="settings/namespace/dest.html">dest</a>
<a href="settings/namespace/fromtosystem.html">tosystem</a>
<a href="settings/namespace/src.html">src</a>
<a href="settings/namespace/dest.html">dest</a>
<a href="settings/macrodef.html">macrodef</a>
<a href="settings/macrodef/attribute.html">attribute</a>
any resolver
<a href="settings/resolvers.html">resolvers</a>
any resolver
<a href="settings/modules.html">modules</a>
<a href="settings/module.html">module</a>
<a href="settings/statuses.html">statuses</a>
<a href="settings/status.html">status</a>
</pre>
<h1>ivysettings</h1>
<b>Tag:</b> ivysettings
Root tag of any ivysettings file.
<h2>Child elements</h2>
<table class="ivy-children">
<thead>
<tr><th class="ivy-chld">Element</th><th class="ivy-chld-desc">Description</th><th class="ivy-chld-card">Cardinality</th></tr>
</thead>
<tbody>
<tr><td><a href="settings/property.html">property</a></td><td>set an ivy variable</td>
<td>0..n</td></tr>
<tr><td><a href="settings/properties.html">properties</a></td><td>loads a properties file as ivy variables</td>
<td>0..n</td></tr>
<tr><td><a href="settings/settings.html">settings</a></td><td>configures ivy with some defaults</td>
<td>0..1</td></tr>
<tr><td><a href="settings/include.html">include</a></td><td>includes another settings file</td>
<td>0..n</td></tr>
<tr><td><a href="settings/classpath.html">classpath</a></td><td>add a location in the classpath used to load plugins</td>
<td>0..n</td></tr>
<tr><td><a href="settings/typedef.html">typedef</a></td><td>defines new types in ivy</td>
<td>0..n</td></tr>
<tr><td><a href="settings/lock-strategies.html">lock-strategies</a></td><td>defines lock strategies</td>
<td>0..1</td></tr>
<tr><td><a href="settings/caches.html">caches</a></td><td>defines repository cache managers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/latest-strategies.html">latest-strategies</a></td><td>defines latest strategies</td>
<td>0..1</td></tr>
<tr><td><a href="settings/parsers.html">parsers</a></td><td>defines module descriptor parsers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/version-matchers.html">version-matchers</a></td><td>defines new version matchers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/triggers.html">triggers</a></td><td>register triggers on ivy events</td>
<td>0..1</td></tr>
<tr><td><a href="settings/namespaces.html">namespaces</a></td><td>defines new namespaces</td>
<td>0..1</td></tr>
<tr><td><a href="settings/macrodef.html">macrodef</a></td><td>defines a new macro resolver</td>
<td>0..n</td></tr>
<tr><td><a href="settings/resolvers.html">resolvers</a></td><td>defines dependency resolvers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/conflict-managers.html">conflict-managers</a></td><td>defines conflicts managers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/modules.html">modules</a></td><td>defines rules between modules and dependency resolvers</td>
<td>0..1</td></tr>
<tr><td><a href="settings/outputters.html">outputters</a></td><td>defines the list of available report outputters</td>
<td>0..1</td></tr>
<tr><td><a href="settings/statuses.html">statuses</a></td><td>defines the list of available statuses</td>
<td>0..1</td></tr>
</tbody>
</table></textarea>
<script type="text/javascript">xooki.postProcess();</script>
</body>
</html>