<commit_before>////
   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.
////

= Ivy Settings

In order to work as you want, ivy sometimes needs some settings. Actually, ivy can work with no specific settings at all, see the link:tutorial/defaultconf.html[default settings documentation] 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 link:use/settings.html[settings] datatype with the path of your settings file.

Here is an example of the settings file:

[source, 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>

----
__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.__


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.

Some useful variables are available for use in settings files:


* ivy.settings.dir +
 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.

* ivy.settings.file +
 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

* ivy.settings.url +
 the URL pointing to the settings file. This is set both when it has been loaded as a file or a URL


*__since 1.4__* Note that all link:https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getProperties()[Java system properties] are available as ivy variables in your settings file.


== Settings file structure


The settings file is structured in some parts and left open in others. In fact, each resolver has its own structure, thus it's not the settings file itself which defines the structure for the resolvers.

[source]
----

ivysettings
    link:settings/property.html[property]
    link:settings/properties.html[properties]
    link:settings/settings.html[settings]
    link:settings/include.html[include]
    link:settings/classpath.html[classpath]
    link:settings/typedef.html[typedef]
    link:settings/credentials.html[credentials]
    link:settings/lock-strategies.html[lock-strategies]
    link:settings/caches.html[caches]
        link:settings/caches/cache.html[cache]
    link:settings/latest-strategies.html[latest-strategies]
    link:settings/version-matchers.html[version-matchers]
    link:settings/triggers.html[triggers]
    link:settings/parsers.html[parsers]
    link:settings/conflict-managers.html[conflict-managers]
    link:settings/outputters.html[outputters]
    link:settings/namespaces.html[namespaces]
        link:settings/namespace.html[namespace]
            link:settings/namespace/rule.html[rule]
                link:settings/namespace/fromtosystem.html[fromsystem]
                    link:settings/namespace/src.html[src]
                    link:settings/namespace/dest.html[dest]
                link:settings/namespace/fromtosystem.html[tosystem]
                    link:settings/namespace/src.html[src]
                    link:settings/namespace/dest.html[dest]
    link:settings/macrodef.html[macrodef]
        link:settings/macrodef/attribute.html[attribute]
        any resolver
    link:settings/resolvers.html[resolvers]
        any resolver
    link:settings/modules.html[modules]
        link:settings/module.html[module]
    link:settings/statuses.html[statuses]
        link:settings/status.html[status]

----


== ivysettings<commit_msg>[doc changes] fix the rendering of the settings file structure, on Ivy settings doc page<commit_after>////
   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.
////

= Ivy Settings

In order to work as you want, ivy sometimes needs some settings. Actually, ivy can work with no specific settings at all, see the link:tutorial/defaultconf.html[default settings documentation] 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 link:use/settings.html[settings] datatype with the path of your settings file.

Here is an example of the settings file:

[source, 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>

----
__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.__


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.

Some useful variables are available for use in settings files:


* ivy.settings.dir +
 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.

* ivy.settings.file +
 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

* ivy.settings.url +
 the URL pointing to the settings file. This is set both when it has been loaded as a file or a URL


*__since 1.4__* Note that all link:https://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getProperties()[Java system properties] are available as ivy variables in your settings file.


== Settings file structure


The settings file is structured in some parts and left open in others. In fact, each resolver has its own structure, thus it's not the settings file itself which defines the structure for the resolvers.

**ivysettings**

    * link:settings/property.html[property]
    * link:settings/properties.html[properties]
    * link:settings/settings.html[settings]
    * link:settings/include.html[include]
    * link:settings/classpath.html[classpath]
    * link:settings/typedef.html[typedef]
    * link:settings/credentials.html[credentials]
    * link:settings/lock-strategies.html[lock-strategies]
    * link:settings/caches.html[caches]
        ** link:settings/caches/cache.html[cache]
    * link:settings/latest-strategies.html[latest-strategies]
    * link:settings/version-matchers.html[version-matchers]
    * link:settings/triggers.html[triggers]
    * link:settings/parsers.html[parsers]
    * link:settings/conflict-managers.html[conflict-managers]
    * link:settings/outputters.html[outputters]
    * link:settings/namespaces.html[namespaces]
        ** link:settings/namespace.html[namespace]
            *** link:settings/namespace/rule.html[rule]
                **** link:settings/namespace/fromtosystem.html[fromsystem]
                    ***** link:settings/namespace/src.html[src]
                    ***** link:settings/namespace/dest.html[dest]
                **** link:settings/namespace/fromtosystem.html[tosystem]
                    ***** link:settings/namespace/src.html[src]
                    ***** link:settings/namespace/dest.html[dest]
    * link:settings/macrodef.html[macrodef]
        ** link:settings/macrodef/attribute.html[attribute]
        ** any resolver
    * link:settings/resolvers.html[resolvers]
        ** any resolver
    * link:settings/modules.html[modules]
        ** link:settings/module.html[module]
    * link:settings/statuses.html[statuses]
        ** link:settings/status.html[status]


== ivysettings
{'fraction_non_alphanumeric': 0.08961727927245168, 'fraction_numerical': 0.001326259946949602, 'mean_word_length': 3.3002036659877803, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1642243', 'n_tokens_mistral': 2862, 'n_tokens_neox': 2776, 'n_words': 996}