0

I'm using a lib_A as the dependency which is using the commons-io 2.11.0 as the dependency to perform IO ops and its marked scope as provided in the lib_A.

My project is a spark application which has HDInsight 5.0 as runtime. This runtime has commons-io version of 2.5.0. In 2.5.0 commons-io version doesn't a method called consume() which was newly added in commons-io 2.11.0v. Due to which I'm getting methodNotFound error.

I tried forcing the particular version as below, but didn't work.

implementation ("commons-io:commons-io"){
        version {
            strictly '2.11.0'
        }
    }

I also tried excluding this lib from the lib_A as well from the cradle as below and tried injecting the required version. But still it's trying to read from the runtime itself.

implementation ("com.files:slfs:${property('lfsVersion')}"){
        exclude group: "commons-io", module: "commons-io"
    }

I wanted to know id this something achievable where I can inform the lib_A to use the injected version and not the runtime provided lib? Any help would be appreciated.

coders
  • 719
  • 1
  • 11
  • 35
  • https://stackoverflow.com/questions/68072021/what-do-two-exclamation-marks-follow-the-version-mean-in-gradle-dependencie – User51 May 04 '23 at 17:20
  • @User51 I have already tried this. I don't see any changes in he behavior – coders May 08 '23 at 15:27

0 Answers0