How do I tell ivy4r to stay offline?

江枫思渺然 提交于 2019-12-06 09:46:14

Setting the cache timeout to eternal

You can set the cache property ${ivy.cache.ttl.default} to eternal this will set the TTL: so that the repository will not be checked for new revisions.

You could achieve this by calling ant with the following parameter:

ant -Divy.cache.ttl.default=eternal build

This is from the documentation:

Defines a TTL (Time To Live) rule for resolved revision caching. When Ivy resolves a dynamic version constraint (like latest.integration or a version range), it can store the result of the resolution (like latest.integration=1.5.1) for a given time, called TTL. It means that Ivy will reuse this dynamic revision resolution result without accessing the repositories for the duration of the TTL, unless running resolve in refresh mode.

...

The TTL duration can also be set to 'eternal', in which case once resolved the revision is always use, except when resolving in refresh mode.

Other references:

Setting UseCacheOnly for the resolve task

The resolve task has the attribute useCacheOnly, which can be used to

force[s] the resolvers to only use their caches and not their actual contents

Example:

<ivy:resolve file="path/to/ivy.xml" useCacheOnly="true/>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!