常春藤:强制的依赖本地快照 [英] Ivy: Forcing local snapshot for dependency

查看:197
本文介绍了常春藤:强制的依赖本地快照的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目A依赖于项目B;双方都在积极开发内部项目。
说最新的项目A版本为1.1.2依赖于项目B 1.1.1。
现在,我们正在开发项目A 1.2.0这依赖于项目B 1.2.0上也在发展。

I have a Project A which depends on Project B; both are internal projects in active development. Say the latest Project A release is 1.1.2 which depends on Project B 1.1.1. Now we are developing Project A 1.2.0 which depends on the Project B 1.2.0 also in development.

<dependency org="my.org" name="projectB" rev="1.2.0" transitive="true" conf="..." changing="true"/>

新建一体化构建的项目B 1.2.0由共同的本地库CI服务器被压,因此非常感谢变每个人都得到最新的整合,尽快为他们出版的基础之上。

New intergration builds for Project B 1.2.0 are pushed by the CI server in the common local repository, so thanks to "changing" everyone gets the latest integration builds as soon as they are published.

说鲍勃正在制定一个项目一个新的功能,需要一些修改项目B;他出版了新的shapshot项目B 1.2.0在他当地的私人仓库,他的被拾起的构建,因为是一个比在公共信息库更近一些。到目前为止,一切OK。

Say Bob is developing a new feature on Project A which requires some modifications to Project B; he publishes a new shapshot Project B 1.2.0 in his local private repository and his is picked up in the build because is more recent than the one in the common repository. So far all ok.

但是,如果爱丽丝犯项目B的东西,CI服务器推共同回购,这是更近的一个比鲍勃具有本地新1.2.0;现在Bob得到它覆盖了本地更改普通版本。

But if Alice commits something in Project B, the CI server pushes a new 1.2.0 on common repo, which is more recent than the one Bob has locally; now Bob gets the common version which overrides his local changes.

当然,我可以使用不同的名称(使用一个聪明的办法属性文件名不具有的ivy.xml结束),像1.2.0_snapshot鲍勃,只要Bob需要本地版本,然后当普通版是确定切换回1.2.0。
但是,这不是有没有办法使用的神器,其状态为快照(这将永远是局部的状态版本)在其中有一体化的那些给力(由CI服务器所产生的那些总是有状态)或高?

Of course I could use different names (using property files in a clever way that name does not have to end in ivy.xml), something like 1.2.0_snapshot for Bob, as long as Bob needs the local version, and then switch back to 1.2.0 when the common version is ok. But isn't there a way to force using artifact whose status is "snapshot" (that will always be the status of local builds) over the ones which have "integration" (the ones produced by CI server will always have that status) or higher?

我试过latest.snapshot,但它需要集成版本,如果更近一些。

I tried "latest.snapshot" but it takes the integration version, if more recent.

什么是对付这种模式的最好方法是什么?

What is the best way to deal with this pattern?

推荐答案

我想你想你的本地域名解析是在强制模式。在ivysettings.xml本地解析器将力=真。

I think you want your local resolver to be in "force mode". Set the force="true" on your local resolver in ivysettings.xml.

见的强制模式描述为:的http:// ant.apache.org/ivy/history/latest-milestone/settings/resolvers.html

See the description of force mode at: http://ant.apache.org/ivy/history/latest-milestone/settings/resolvers.html

这篇关于常春藤:强制的依赖本地快照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆