`
dsotbs936
  • 浏览: 38012 次
  • 性别: Icon_minigender_1
  • 来自: 浙江
文章分类
社区版块
存档分类
最新评论

Ivy's Resolvers

阅读更多

Defines a list of dependency resolvers usable in ivy. Each dependency resolver is identified by its name, given as an attribute.

The child tag used for the dependency resolver must be equal to a name of a dependency resolver type (either built-in or added with the typedef tag).

since 1.3 Once defined, resolvers can be referenced by their name, using the following syntax:

<resolver ref="alreadydefinedresolver"/>

Note that this works only if the resolver has been already defined, and not if it is defined later in the ivysettings file.

Child elements

Element Description Cardinality
any resolver adds a resolver to the list of available resolvers 1..n

Built-in Resolvers

Ivy comes with a set of built-in dependency resolvers able to answer to the most common needs.

If you don't find the one you want here, you can also check if some one has not contributed it in the links page, or even write your own.

There are basically two types of resolver in Ivy: composite and standard resolvers. A composite resolver is a resolver which delegates the work to other resolvers. The other resolvers are standard resolvers.

Here is the list of built-in resolvers:

Name Type Description
IvyRep Standard Finds ivy files on ivyrep and artifacts on ibiblio.
IBiblio Standard Finds artifacts on ibiblio.
Packager Standard Finds ivy files and packaging instructions via URLs, then creates artifacts by following the instructions.
FileSystem Standard This very performant resolver finds ivy files and artifacts in your file system.
Url Standard Finds ivy files and artifacts in any repository accessible with urls.
Vfs Standard Finds ivy files and artifacts in any repository accessible with apache commons vfs.
ssh Standard Finds ivy files and artifacts in any repository accessible with ssh.
sftp Standard Finds ivy files and artifacts in any repository accessible with sftp.
Chain Composite Delegates the finding to a chain of sub resolvers.
Dual Composite Delegates the finding of ivy files to one resolver and of artifacts to another.

Common features and attributes

All resolvers of the same type share some common features and attributes detailed here.

Features

validation

All standard resolvers support several options for validation.

The validate attribute is used to configure if Ivy files should be checked against the Ivy file xml schema.

The checkconsistency attribute allow to enable or disable consistency checking between what is expected by Ivy when it finds a module descriptor, and what the module descriptor actually contains.

The descriptor attribute let one define if module descriptors are mandatory or optional.

The checksums attribute is used to define the list of checksums files to use to check the content of downloaded files has not been corrupted (eg during transfer).

force

Any standard resolver can be used in force mode, which is used mainly to handle local development builds. In force mode, the resolver attempts to find a dependency whatever the requested revision is (internally it replace the requested revision by 'latest.integration'), and if it finds one, it forces this revision to be returned, even when used in a chain with returnFirst=false.

By using such a resolver at the beginning of a chain, you can be sure that Ivy will pick up whatever module is available in this resolver (usually a private local build) instead of the real requested revision. This allows to handle use case like a developer working on modules A and C, where A -> B -> C, and pick up the local build for C without having to publish a local version of B.
since 2.0

Attributes

Attribute Description Required Composite Standard
name the name which identify the resolver Yes Yes Yes
validate indicates if resolved ivy files should be validated against ivy xsd No, defaults to call setting Yes Yes
force Indicates if this resolver should be used in force mode (see above). since 2.0 No, defaults to false No Yes
checkmodified Indicates if this resolver should check lastmodified date to know if an ivy file is up to date. No, defaults to ${ivy.resolver.default.check.modified} No Yes
changingPattern Indicates for which revision pattern this resolver should check lastmodified date to know if an artifact file is up to date. since 1.4. See cache and change management for details. No, defaults to none Yes Yes
changingMatcher The name of the pattern matcher to use to match a revision against the configured changingPattern. since 1.4. See cache and change management for details. No, defaults to exactOrRegexp Yes Yes
alwaysCheckExactRevision Indicates if this resolver should check the given revision even if it's a special one (like latest.integration). since 1.3 No, defaults to ${ivy.default.always.check.exact.revision} No Yes
namespace The name of the namespace to which this resolver belong since 1.3 No, defaults to 'system' Yes Yes
checkconsistency true to check consistency of module descriptors found by this resolver, false to avoid consistency check since 1.3 No, defaults to true No Yes
descriptor 'optional' if a module descriptor (usually an ivy file) is optional for this resolver, 'required' to refuse modules without module descriptor since 2.0 No, defaults to 'optional' No (except dual) Yes
allownomd DEPRECATED. Use descriptor="required | optional" instead.
true if the absence of module descriptor (usually an ivy file) is authorised for this resolver, false to refuse modules without module descriptor since 1.4
No, defaults to true No (except dual) Yes
checksums a comma separated list of checksum algorithms to use both for publication and checking since 1.4 No, defaults to ${ivy.checksums} No Yes
latest The name of the latest strategy to use. No, defaults to 'default' Yes Yes
cache The name of the cache manager to use. No, defaults to the value of the default attribute of caches No Yes

Examples

<resolvers>
<filesystem name="1" cache="cache-1">
<ivy pattern="${ivy.settings.dir}/1/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="${ivy.settings.dir}/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<chain name="chain1">
<resolver ref="1"/>
<ivyrep name="ivyrep"/>
</chain>
<chain name="chain2" returnFirst="true" dual="true">
<resolver ref="1"/>
<ibiblio name="ibiblio"/>
</chain>
</resolvers>

Defines a filesystem resolver, named '1', which is then used in two chains, the first which seconds the filesystem resolver with an ivyrep resolver, and second which seconds the filesystem resolver with an ibiblio resolver, and which returns the first module found, and uses the whole chain to download artifacts (see corresponding resolvers documentation for details about them). Resolver 1 will use a cache named 'cache-1' which should have been defined under the caches element.

 

go http://ant.apache.org/ivy/history/2.1.0-rc2/settings/resolvers.html

分享到:
评论

相关推荐

    liferay开发需下载的.ivy

    - `resolvers`:配置依赖的来源,如远程仓库或本地文件系统。 总的来说,`liferay开发需下载的.ivy`意味着在Liferay开发环境中,使用Ivy作为依赖管理工具,通过`.ivy`文件配置项目依赖,以实现自动化下载和管理,...

    ant+ivy+nexus的使用

    在IT行业中,构建管理和依赖管理是软件开发流程中的重要环节,Ant、Ivy和Nexus是其中的关键工具。Ant是一个基于Java的任务驱动的构建工具,它允许开发者自定义构建脚本来自动化项目的构建过程。Ivy则是一个依赖管理...

    resolvers:定期验证的公共DNS解析器列表

    resolvers.txt定期验证的公共DNS解析器的新列表。 $ wget https://raw.githubusercontent.com/janmasarik/resolvers/master/resolvers.txt$ massdns -r resolvers.txt domains_to_resolve.txt为什么?人们需要一个好...

    resolvers

    在IT行业中,"resolvers"通常指的是在软件开发中用于处理数据获取和转换的组件,尤其是在GraphQL或某些特定框架(如React Apollo)中。这里,我们深入探讨一下resolvers的相关知识。 1. **什么是Resolvers**: ...

    resolvers::clipboard:验证解析器

    $ npm install @hookform/resolvers 原料药 resolver(schema: object, config?: object) 类型 必需的 描述 图式 object ✓ 验证模式 配置 object 验证架构配置对象 快速开始 无效的简单对象架构验证。 import ...

    graphql-merge-resolvers:轻巧而功能强大的软件包使您可以轻松地模块化和合并解析器

    @ wiicamp / graphql-merge-resolvers 轻巧而功能强大的软件包使您可以轻松地模块化和合并您的解析器。 目录 特征 易于使用 纯JavaScript 轻量级软件包,无依赖 ES6课程 安装 npm i --save @wiicamp/graphql-merge...

    dnscrypt-resolvers:公共 DNSCrypt DoH DNS 服务器和 DNS 中继列表

    公共 DNSCrypt 和 DoH 服务器列表 公共 DNS 服务器的交互式列表: 公共DNS服务器互动图: 稳定下载地址: 更多 DNS 服务器来源: DNSCrypt 中继列表 匿名 DNS 中继: ODoH 服务器和中继列表 ...

    find_open_resolvers:查找开放递归域名服务器

    find_open_resolvers -- 在给定的 IP 范围内查找开放的 DNS 解析器。 概要 find_open_resolvers [选项] [IP 范围] Options: --queries simultaneous queries to perform (100) --retries number of retries of ...

    graphql-resolvers:GraphQL的解析器组成库

    该软件包在上可用: graphql-resolvers npm install graphql-resolvers 不过,您应该考虑使用 。 动机 很多时候,我们最终在解析器上重复很多逻辑。 例如,访问控制是可以在解析器级别完成的操作,但是即使在为此类...

    Fresh-Resolvers:每小时更新一次的最新DNS解析器列表

    《Fresh-Resolvers:每小时更新的最新DNS解析器列表详解》 DNS(Domain Name System)是互联网上的一项核心服务,它将人类易读的域名转换为计算机可识别的IP地址。在日常网络活动中,DNS解析器起着至关重要的作用,...

    apollo-resolvers:Apollostack 的 GraphQL 服务器的富有表现力和可组合的解析器

    apollo-resolvers的目标是通过将许多这些决策抽象成一个漂亮的、富有表现力的设计模式来简化开发人员在使用 GraphQL 时的体验。 apollo-resolvers提供了一种创建解析器的模式,这些解析器本质上类似于React式中间件...

    dsa-resolvers

    标题 "dsa-resolvers" 暗示我们正在讨论一个与分布式系统架构(DSA)相关的项目,特别是关于解析器的部分。这个解析器可能用于处理特定的数据请求或操作,以支持智能合约的功能。描述中的“智能合约可简化读取操作”...

    fresh-resolvers

    "Fresh Resolvers" 是一个专为React开发设计的解析器列表,它专注于提供无毒、可靠的解决方案,以满足开发者在项目中枚举各种需求时的需求。这个项目利用GitHub的自动化功能,每两小时进行一次更新,确保所列出的...

    dmut-resolvers:dmut项目的公共DNS服务器列表

    此仓库使用github动作生成resolvers.txt。 该任务每天运行一次。 该过程包括: 从下载公共列表 使用检查此列表 更新此仓库回购结果。 生成此文件以供 top20.txt 排名前20位的公共dns服务器,以防您需要小型快速...

    sbt-artifactory:一个小巧的sbt插件,可简化向JFrog Artifactory的发布

    用法添加到您的project/plugins.sbt resolvers + = Resolver .url( " ivy-release-local " , url( s " https://jrouly.jfrog.io/artifactory/ivy-release-local " ))( Resolver .ivyStylePatterns)addSbtPlugin( " ...

    mvel 2.0.15

    MVEL supports that too, and there is both and easy way and a more advanced way (dealing with resolvers – which we won't get to here). The easy way simply involves passing in a Map of variables ...

    dnsprobe:DNSProb是建立在可重试dns之上的工具,它允许您使用用户提供的解析程序列表执行您选择的多个dns查询

    注意-该项目已终止。新的更新和修复将被推送到 。... dnsprobe -s resolvers.txt -t 并发请求数(默认为250) dnsprobe -t 500 -F 输出类型 dnsprobe -f json -o 输出文件(可选) dnsprobe -o

    fresh-resolvers:每天更新的新DNS解析器列表

    新鲜的解析器 使用程序每天生成新的可用DNS解析程序的列表。 列表应该通过使用计划的Github操作可靠地保持更新,而不必依赖外部VPS之类的东西。

    scalaz-stream-contrib:scalaz-stream 的附加进程

    scalaz-stream-贡献 ...resolvers + = " Frank's Bintray " at " https://dl.bintray.com/fthomas/maven " libraryDependencies + = " eu.timepit " %% " scalaz-stream-contrib " % " &lt;version&gt;

    local-dns-resolver:用于在具有DNSSEC支持Linux机器上安装本地未绑定DNS解析器的脚本

    sudo pacman -S unbound ``` 安装完成后,需要进行一些基本的配置。Unbound的主配置文件通常位于`/etc/unbound/unbound.conf`。在这个文件中,你可以定义服务器的行为,例如设置监听的IP地址和端口,以及DNSSEC的...

Global site tag (gtag.js) - Google Analytics