Search code examples
mavenratpack

Ratpack 1.5.4 hystrix dependency cannot be resolved


I cannot compile my project that uses Ratpack 1.5.4 because there is a missing dependency to Hystrix 1.5.13 which cannot be resolved.

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

What is wrong here?


Solution

  • You can try excluding com.netflix:hystrix-core:1.5.13 from io.ratpack:ratpack-hystrix:1.5.4 and then you can add com.netflix:hystrix-core:1.5.12 directly to your pom.xml file, something like that:

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

    I've tested this simple Maven Ratpack "Hello, World!" app https://github.com/wololock/ratpack-maven-example

    It compiles in Travis without any issue - https://travis-ci.org/wololock/ratpack-maven-example (I have com.netflix:hystrix-core:1.5.13 in my local .m2 repository, so I wanted to use something with a clean local Maven repository like Travis CI)

    I don't know if version 1.5.13 got rolled back or something like that. It can be found in MvnRepository.com https://mvnrepository.com/artifact/com.netflix.hystrix/hystrix-core/1.5.13 however it says that 1.5.12 is newer, even though it got released 2 months earlier.