如何解决具有infinispan依赖性的常春藤中的依赖性问题?

时间:2019-05-22 10:57:50

标签: maven ant dependencies ivy infinispan

我在解决infinispan库(infinispan-jcache)的依赖项时遇到问题。如果我运行ant ivy-retrieve,则会收到以下消息:

ivy-retrieve:
[ivy:cleancache] :: Apache Ivy 2.5.0-rc1 - 20180412005306 :: http://ant.apache.org/ivy/ ::
[ivy:cleancache] :: loading settings :: url = jar:file:/home/andreas/.ant/lib/ivy-2.5.0-rc1.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:retrieve] :: resolving dependencies :: example#ivy;working@ubuntu-dev
[ivy:retrieve]  confs: [default]
[ivy:retrieve] :: resolution report :: resolve 1473ms :: artifacts dl 0ms
    ---------------------------------------------------------------------
    |                  |            modules            ||   artifacts   |
    |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
    ---------------------------------------------------------------------
    |      default     |   1   |   0   |   0   |   0   ||   0   |   0   |
    ---------------------------------------------------------------------
[ivy:retrieve] 
[ivy:retrieve] :: problems summary ::
[ivy:retrieve] :::: WARNINGS
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]      :: org.infinispan#infinispan-jcache;9.4.8.Final: org.infinispan#infinispan-jcache-parent;9.4.8.Final->org.infinispan#infinispan-parent;9.4.8.Final->org.infinispan#infinispan-build-configuration-parent;9.4.8.Final
[ivy:retrieve]      ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] 
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

BUILD FAILED
/home/andreas/git/ivy-test/build.xml:5: impossible to resolve dependencies:
    resolve failed - see output for details

Total time: 2 seconds

如果启用详细输出,则问题依存关系似乎是infinispan-build-configuration-parent-9.4.8.Final.jar,而该问题根本不在中央行家仓库中

[ivy:retrieve] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/org/infinispan/infinispan-build-configuration-parent/9.4.8.Final/infinispan-build-configuration-parent-9.4.8.Final.jar

build.xml

<?xml version="1.0" encoding="utf-8"?>
<project name="ivy" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
    <target name="ivy-retrieve" description="retrieve dependencies locally">
        <ivy:retrieve pattern="lib/[artifact]-[revision](-[classifier]).[ext]"/>
    </target>
</project>

ivy.xml

<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
    <info organisation="example" module="ivy"/>
    <dependencies>
        <dependency org="org.infinispan" name="infinispan-jcache" rev="9.4.8.Final" />
    </dependencies>
</ivy-module>

在将infinispan版本作为常春藤依赖项下载方面,有人对它有很好的解决方案吗? Maven Central上引用的文件夹中仅包含一个pom文件。我可能必须配置常春藤还是仅使用其他存储库?

1 个答案:

答案 0 :(得分:2)

该jar不存在,因为构建配置具有包装pom。我在本地尝试过,Ivy的依赖解析器错误地抛出org.apache.ivy.plugins.circular.CircularDependencyException,因为它无法理解层次结构...

[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-bom;9.4.13.Final {} with public (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)
[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-bom;9.4.13.Final {} with main (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)
[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-parent;9.4.13.Final {} with public (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)
[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-parent;9.4.13.Final {} with main (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)
[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-commons;9.4.13.Final {*=[*]} with public (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)
[ivy:retrieve] problem occurred while resolving dependency: org.infinispan#infinispan-commons;9.4.13.Final {*=[*]} with main (org.apache.ivy.plugins.circular.CircularDependencyException: org.infinispan#infinispan-parent;9.4.13.Final->org.infinispan#infinispan-build-configuration-parent;9.4.13.Final)

这看起来像https://issues.apache.org/jira/browse/IVY-1588

如果您使用从master生成的最新的ivy.jar,它会起作用:https://builds.apache.org/view/All/job/Ivy/lastSuccessfulBuild/artifact/build/artifact/jars/