Skip to content

Commit

Permalink
fix(dependencies): Forcing oci-java-sdk-objectstorage version for des…
Browse files Browse the repository at this point in the history
…ired conflict resolution. (#1096)

While enforcing the direct and transitive dependencies strictly from kork-bom using "enforcedPlatform" in build.gradle as:

implementation(enforcedPlatform("io.spinnaker.kork:kork-bom:$korkVersion"))

oci-java-sdk-bom:1.5.17 is overriding the oci-java-sdk-objectstorage:1.19.1 (transitive dependency) version, which is an older version coming from kork-bom mentioned in spinnaker-dependencies.gradle.
It is causing an error in front50-oracle module as given below:

> Task :front50-oracle:compileJava
/home/ubuntu/spinnaker-comp/sb-upgrade-2-3-12/front50/front50-oracle/src/main/java/com/netflix/spinnaker/front50/model/OracleStorageService.java:232: error: cannot find symbol
            buildObjectKey(objectType, summary.getName()), summary.getTimeModified().getTime());
                                                                  ^
  symbol:   method getTimeModified()
  location: variable summary of type ObjectSummary
Note: /home/ubuntu/spinnaker-comp/sb-upgrade-2-3-12/front50/front50-oracle/src/main/java/com/netflix/spinnaker/front50/model/OracleStorageService.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

> Task :front50-oracle:compileJava FAILED

FAILURE: Build failed with an exception.

In order to fix, we require oci-java-sdk-objectstorage:1.19.1 to force restore.
Forcing the specified version will take precedence during conflict resolution and provide desired version.
  • Loading branch information
j-sandy authored Feb 26, 2022
1 parent e8c7adc commit 9813016
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion front50-oracle/front50-oracle.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ dependencies {

implementation "com.github.ben-manes.caffeine:guava"
implementation "io.spinnaker.kork:kork-core"
implementation "com.oracle.oci.sdk:oci-java-sdk-objectstorage:1.19.1"
implementation ('com.oracle.oci.sdk:oci-java-sdk-objectstorage:1.19.1'){
force=true
}
implementation "com.sun.jersey:jersey-client:1.19.4"
implementation "org.springframework.boot:spring-boot-autoconfigure"
implementation "org.springframework.boot:spring-boot-starter-actuator"
Expand Down

0 comments on commit 9813016

Please sign in to comment.