【问题标题】:IvyIDEA plugin doesn't download all the dependenciesIvyIDEA 插件不会下载所有依赖项
【发布时间】:2021-07-06 05:22:26
【问题描述】:

我正在做一个项目,其中 ant + ivy 用于构建过程。

由于 Intellij IDEA 是我用于开发的主要 IDE,因此我下载了 IvyIDEA 插件,以便自动执行通过 ivy 解决依赖关系的过程。

一段时间后,我注意到并非所有依赖项都已下载,其中一些已下载,但缺少一些自定义工件。我通过插件检查了生成的依赖项列表,其中一些实际上丢失了,因为解析过程成功完成:

report for projName compile produced in C:\Users\test\.ivy2\cache\projName-compile.xml
    resolve done (6375ms resolve - 156ms download)
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
post 1.3 ivy file: using exact as default matcher
No problems detected during resolve for module 'ProjName' [All configurations].

我开始深入研究插件生成的 ivy 日志,并看到了一堆不同的依赖项:

Sort dependencies of : projToImport;1.1.85300.20210326.5 / Number of dependencies = 8
Non matching revision detected when sorting.  projToImportdepends on anotherProj;1.1.81201.20210326.1, doesn't match anotherProj;1.1.81201.20210406.1
Module descriptor is processed : junit#junit;4.11
....

重要提示:当我在安装了 Ivy 插件的 Eclipse IDE 中执行相同操作时,一切正常,我可以看到 ivy.xml 中描述的所有依赖项这让我觉得我的 ivy-settings .xml 和 ivy.xml 文件是正确的。

所以,我假设 IvyIDEA 插件不能以正确的方式工作。怎么可能解决这个问题?

我的 IveIDEA 配置:

【问题讨论】:

    标签: java intellij-idea ant ivy intellij-plugin


    【解决方案1】:

    问题出在 ivy 版本中:我使用的当前版本的 IvyIDEA 插件 (1.0.16) 包含 ivy 2.5.0,我必须使用 ivy 2.4.0 才能运行我的 ivy-settings.xml\ ivy.xml。

    所以我的解决方案是将 ivy 降级到 2.4.0 版。

    【讨论】:

      猜你喜欢
      • 2017-04-19
      • 1970-01-01
      • 2016-01-27
      • 2016-06-26
      • 2011-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-30
      相关资源
      最近更新 更多