Ivy

1. What's Ivy?
Ivy is a tool for managing (recording, tracking, resolving and reporting) project dependencies.

3 types of repositories: Local, Share & Public

2. Configuration file
ivy.xml: defines module's info (org, module properties), configurations, dependencies & publications.

ivysetting.xml: properties(some properties for the Ivy process), settings(initializes some parameters for the Ivy process), resolvers(defines the resolvers to use), modules(configure which resolver should be used for which module).

eg.
<publications>
<artifact name="filter-api" type="jar" conf="api" ext="jar"/>
<artifact name="filter-hmimpl" type="jar" conf="homemade-impl" ext="jar"/>
<artifact name="filter-ccimpl" type="jar" conf="cc-impl" ext="jar"/>
</publications>
In the publications tag, we defined the artifacts we produce (jars in this case) and we assign them to a configuration. When others use our library they will have a flexible way to ask for what they need.

3. Resolve, Retrieve
Resolve: ivy actually resolves the dependencies of one module. It first needs to access the ivy file of the module for which it resolves the dependencies. Then, for each dependency declared in this file, it asks the appropriate resolver (according to settings) to find the module.
When the dependency module has been found, its ivy file is downloaded to the ivy cache. Then ivy checks if the dependency module has dependencies, in which case it recursilvely traverses the graph of dependencies.

Retrieve: copying artifacts from the cache to another directory structure.

ivy:deliver
1) generate a resolved ivy file
2) do recursive delivery

ivy:publish
Publishes the current module's artifacts and the resolved descriptor (delivered ivy file)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值