我是否可以使用动态修订来声明依赖项,同时限制检索到的工件的状态?例如,我想定义一个版本范围,例如“[1.0,1.1[”,但我不想要具有集成状态的工件,只需要里程碑或发布。因此,如果版本 1.0.5 的状态为“发布”,即使版本 1.0.6 的状态为“集成”,我也想要版本 1.0.5。
我知道最新的。status,但这并不是我真正想要的:我需要定义修订的上限和下限。
也许解决方案是定义您自己的版本匹配器,请参阅http://ant.apache.org/ivy/history/latest-milestone/settings/version-matchers.html http://ant.apache.org/ivy/history/latest-milestone/settings/version-matchers.html
我用它(在 ivysettings.xml 中)来实现:
<!-- Matcher for build with given build number
It assumes the version number is on the form
#.#__.# where the lastet '.#' is the build number. -->
<version-matchers usedefaults="true">
<pattern-vm>
<match revision="build_number" pattern="[\d\.]+\.${buildnumber}" args="buildnumber" matcher="regexp"/>
</pattern-vm>
</version-matchers>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)