什么是Ivy与Maven的版本等效:display-dependency-updates? [英] What is the Ivy equivalent of Maven's versions:display-dependency-updates?
问题描述
我有一个ivy.xml文件,在其中明确指定了我的依赖项. Ivy内置了什么功能,可以让我发现或自动更新过时的依赖关系?
I have an ivy.xml file where I specify my dependencies explicitly. Is there any functionality built into Ivy that will let me discover or automatically update my dependencies which are out of date?
我不想使用Latest.release,因为我想要一个完全稳定且可复制的版本.但是我偶尔会想更新一些依赖关系,同时最好回答这个问题,还有哪些其他依赖关系已经过时了?
I don't want to use latest.release because I want a completely stable and reproducible build. But every once in a while I'll want to update some dependencies and at the same time it would be good to answer the question, which other dependencies are out of date?
推荐答案
像您一样,我只对内部依赖项使用动态版本.升级时,在新的开发阶段开始时,我将使用一种存储库搜索工具来发现第三方库的新版本:
Like you, I only use dynamic versions for in-house dependencies. When upgrading, at the start of a new development phase, I would use one of the repository search tools to discover new versions of 3rd party libraries:
- http://mvnrepository.com/
- http://mavencentral.sonatype.com/
正如我确定的您所知道的,另一个问题是升级依赖项通常会导致非自愿升级传递依赖项....
As I'm sure you're aware, another problem is that upgrading dependencies can often lead to an involuntary upgrade of your transitive dependencies....
我建议生成一个常春藤依赖报告,并使用它来检查代码的模块使用情况.我发现这非常有用,特别是考虑到某些第三方Maven模块的行为不佳,并且会将许多不必要的库导入到我的类路径中.
What I'd suggest is to generate an ivy dependency report and use this to review your code's module usage. I find this very useful especially considering that some 3rd party Maven modules are not well behaved and will import many unnecessary libraries onto my classpath.
以下是我的标准依赖项目标的示例:
The following is an example of my standard dependencies target:
<target name='dependencies' description='Resolve project dependencies and set classpaths'>
<ivy:resolve/>
<ivy:report todir='${ivy.reports}' graph='false' xml='false'/>
<ivy:cachepath pathid="compile.path" conf="compile"/>
<ivy:cachepath pathid="provided.path" conf="provided"/>
<ivy:cachepath pathid="runtime.path" conf="runtime"/>
<ivy:cachepath pathid="test.path" conf="test"/>
</target>
希望这会有所帮助....如果您找到一种自动管理此方法的方法,我会很感兴趣.
Hope this helps.... If you find a way to automatically manage this I'd be interested.
这篇关于什么是Ivy与Maven的版本等效:display-dependency-updates?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!