Ivy Chinese Reference Document (9)-Settings file

Source: Internet
Author: User

1) Settings file

In order to work as you think, ivy sometimes needs some setup. In fact, Ivy can work with absolutely no special settings, consult the default settings document to get more detailed information. But Ivy has the ability to work in completely different contexts. You just need to configure it correctly.

The settings are specified through an XML file, usually named called Ivysettings.xml. To configure Ivy in ant, you only need to use the path of your settings file to configure the data type.

Here is an example of a setup file:

<ivysettings>
         <properties file="${ivy.settings.dir}/ivysettings-file.properties" />
         <settings defaultCache="${cache.dir}" defaultResolver="ibiblio" 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>

In general, the setup file can configure the default cache directory used by Ivy and the dependency resolver used to resolve dependencies.

Note: To be able to work, this setup file requires a property file named Ivysettings-file.properties in the same directory as the settings file, which contains the Ivy variables that are required.

There are some useful variables in the settings file:

* Ivy.settings.dir

This variable involves the directory where Ivy sets itself. If the setting is loaded as a file this variable is available. If it is a URL, take the previous section of the URL's last slash "/". If the URL does not have a slash "/", then the variable is not set.

* Ivy.settings.file

Sets the path of the file itself, only when it is loaded as a file. If the settings file is loaded as a URL, the variable is not set.

* Ivy.settings.url

The URL that points to the settings file. Set when the settings file is loaded as a file or URL.

After the ivy1.4 version, all of the main Java System properties can be used as ivy variables in the settings file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.