0

I am trying to compile a simple module with a single direct dependency and I am getting many errors about packages that are read from 2 libraries.
I am using the latest stable version of the libraries and I see that the package is split between them.

Is there any way to solve the issue without waiting for a new version of the libraries with the package unsplit?

module-info.java:

module abc {
    requires spring.cloud.starter.feign;
}

build.gradle:

apply plugin: 'java-library'
dependencies {
    api 'org.springframework.cloud:spring-cloud-starter-feign:1.3.4.RELEASE'
}

Java version: 9+181
gradle version: 4.2

./gradlew Abc:compileJava

Task :Abc:compileJava
error: the unnamed module reads package com.netflix.ribbon from both ribbon and ribbon.transport
error: the unnamed module reads package com.netflix.loadbalancer from both ribbon.httpclient and ribbon.loadbalancer
error: the unnamed module reads package org.apache.commons.logging from both jcl.over.slf4j and commons.logging
error: the unnamed module reads package org.apache.commons.logging.impl from both jcl.over.slf4j and commons.logging
error: the unnamed module reads package com.netflix.client.http from both ribbon.httpclient and ribbon.core
error: the unnamed module reads package com.netflix.client from both ribbon.loadbalancer and ribbon.core
error: module spring.cloud.starter.archaius reads package com.netflix.ribbon from both ribbon and ribbon.transport
error: module spring.cloud.starter.archaius reads package org.apache.commons.logging from both jcl.over.slf4j and commons.logging
error: module spring.cloud.starter.archaius reads package org.apache.commons.logging.impl from both jcl.over.slf4j and commons.logging
error: module spring.cloud.starter.archaius reads package com.netflix.loadbalancer from both ribbon.httpclient and ribbon.loadbalancer
...
100 errors

M A
  • 71,713
  • 13
  • 134
  • 174
msayag
  • 8,407
  • 4
  • 30
  • 29
  • 1
    In my case I only depend directly on a single library which I don't control, so I might have to tailor it by excluding the conflicting libs and include them back , merged. Ugly but might work... – msayag Oct 03 '17 at 19:08
  • Ya probably a tougher way, but futuristic in terms of migration to newer java version. – Naman Oct 03 '17 at 19:10
  • 1
    Or I'll just wait for the library maintainer to provide a compliant version... – msayag Oct 03 '17 at 21:39

0 Answers0