【问题标题】:how to ignore ivy revision number?如何忽略常春藤修订号?
【发布时间】:2011-02-25 22:50:08
【问题描述】:

我有一些没有修订号的 jar 文件。但是由于 rev 是 ivy 依赖项的强制属性,所以我提供了 revision 属性。但我在 url 解析器中有类似 (-[revision]) 的东西。
但它采用模块编号而不是忽略修订属性。我知道它不会忽略修订属性,因为它不为空。

以下是我得到的输出

 default-cache: no cached resolved revision for perltools#perltools;latest.integration
[ivy:retrieve]      tried httP://myrepo/ivyRepository/perltools/jars/[revision]/perltools-[revision].jar
[ivy:retrieve]  listing all in httP://myrepo/ivyRepository/perltools/jars/[revision]/perltools-[revision].jar
[ivy:retrieve]  using privateRepo to list all in httP://myrepo/ivyRepository/perltools/jars/
[ivy:retrieve] ApacheURLLister found URL=[httP://myrepo/ivyRepository/perltools/jars/perltools.jar].
[ivy:retrieve]      found 1 resources
[ivy:retrieve]  found revs: [perltools.jar]
[ivy:retrieve] HTTP response status: 404 url=httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar
[ivy:retrieve] CLIENT ERROR: Not Found url=httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar

有人可以解释为什么它以 module.ext 作为修订版,而我指定的修订版是 latest.integration 并且在 myrepo 中,我没有修订版属性。

它只是

[http://myrepo/ivyRepository/perltools/jars//perltools.jar]

有人可以帮我避免修订属性吗?

【问题讨论】:

  • 您需要提供更多详细信息。例如,您是如何在 ivysettings 文件中配置解析器的。
  • 不确定为什么要避免使用修订号。 Ivy 的目的是根据工件的修订号执行依赖管理:-)

标签: ivy


【解决方案1】:

为了忽略修订并从 Jenkins 服务器下载 ZIP,我使用了解析器(ivysettings.xml),例如

<url name="jenkins" m2compatible="true" checksums="">
    <artifact pattern="http://jenkins:8080/job/[organization]/ws/sources/[module]/*[ext]*/[artifact].[ext]" />
</url>

还有一个依赖(ivy.xml),比如

<dependency org="source-build" name="project" rev="+">
    <artifact name="project" type="zip" />
</dependency>

所以我使用+ 进行修订,因为latest.release 只是没有正确解析并且一个空字符串(rev="")可以工作,但在本地缓存中留下了一个尾随破折号的工件,我不喜欢。

请注意,由于bug in Ivy,我还必须在解析器定义中禁用校验和。

【讨论】:

    【解决方案2】:

    您可以只使用“latest.integration”作为修订版吗?

    【讨论】:

      猜你喜欢
      • 2013-04-11
      • 1970-01-01
      • 2011-10-26
      • 2018-07-02
      • 2015-01-24
      • 2013-09-19
      • 1970-01-01
      • 2012-01-13
      • 2012-11-16
      相关资源
      最近更新 更多