Search code examples
maven-2mavenivydependency-management

What is the Ivy equivalent of Maven's versions:display-dependency-updates?


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?

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?


Solution

  • 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:

    As I'm sure you're aware, another problem is that upgrading dependencies can often lead to an involuntary upgrade of your transitive dependencies....

    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.