1

我无法编译使用 Ratpack 1.5.4 的项目,因为缺少对 Hystrix 1.5.13 的依赖项,无法解决。

http://search.maven.org/#search%7Cga%7C1%7Cg%3A"com.netflix.hystrix"%20AND%20v%3A"1.5.13"

这里有什么问题?

4

1 回答 1

0

您可以尝试排除com.netflix:hystrix-core:1.5.13io.ratpack:ratpack-hystrix:1.5.4然后您可以com.netflix:hystrix-core:1.5.12直接添加到您的 pom.xml 文件中,如下所示:

    <dependencies>
        <dependency>
            <groupId>io.ratpack</groupId>
            <artifactId>ratpack-core</artifactId>
            <version>1.5.4</version>
        </dependency>
        <dependency>
            <groupId>io.ratpack</groupId>
            <artifactId>ratpack-hystrix</artifactId>
            <version>1.5.4</version>
            <exclusions>
                <exclusion>
                    <groupId>com.netflix.hystrix</groupId>
                    <artifactId>hystrix-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.netflix.hystrix</groupId>
            <artifactId>hystrix-core</artifactId>
            <version>1.5.12</version>
        </dependency>
    </dependencies>

我已经测试了这个简单的 Maven Ratpack “Hello, World!” 应用程序https://github.com/wololock/ratpack-maven-example

它在 Travis 中编译没有任何问题 - https://travis-ci.org/wololock/ratpack-maven-example(我com.netflix:hystrix-core:1.5.13在我的本地 .m2 存储库中,所以我想使用像 Travis CI 这样的干净的本地 Maven 存储库)

我不知道版本是否1.5.13回滚或类似的东西。它可以在 MvnRepository.com https://mvnrepository.com/artifact/com.netflix.hystrix/hystrix-core/1.5.13中找到,但是它说 1.5.12 更新,即使它在 2 个月前发布。

于 2018-05-06T21:43:21.573 回答