Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dependency): Issue of missing javax.validation, hibernate-validat…
…or dependencies and version conflict of com.google.cloud:google-cloud-storage while upgrading the spring cloud to Hoxton.SR12 in kork. (#1119) While upgrading spring cloud to Hoxton.SR12, we encountered below errors : > Task :front50-core:compileJava FAILED /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:31: error: package javax.validation does not exist import javax.validation.Valid; ^ /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:34: error: package org.hibernate.validator.constraints does not exist import org.hibernate.validator.constraints.URL; ^ /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:44: error: cannot find symbol @Valid ^ symbol: class Valid /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:108: error: package javax.validation.constraints does not exist @javax.validation.constraints.Pattern(regexp = VERSION_PATTERN) ^ /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:60: error: cannot find symbol @Valid @nonnull private List<Release> releases = new ArrayList<>(); ^ symbol: class Valid location: class PluginInfo /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:75: error: cannot find symbol @url private String homepage; ^ symbol: class URL location: class PluginInfo /front50/front50-core/src/main/java/com/netflix/spinnaker/front50/model/plugins/PluginInfo.java:201: error: cannot find symbol @url String url; ^ symbol: class URL location: class Repository 7 errors FAILURE: Build failed with an exception. ======================= > Task :front50-gcs:compileTestKotlin FAILED e: /front50/front50-gcs/src/test/kotlin/com/netflix/spinnaker/front50/model/FakeStorageRpc.kt: (52, 10): Class 'FakeStorageRpc' is not abstract and does not implement abstract member public abstract fun getCurrentUploadOffset(p0: String!): Long defined in com.google.cloud.storage.spi.v1.StorageRpc FAILURE: Build failed with an exception. The root cause is missing javax.validation:validation-api and hibernate-validator dependencies, the reason being upgrade of transitive dependency resilience4j from [1.0.0](https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-framework-common/1.0.0) to [1.7.0](https://mvnrepository.com/artifact/io.github.resilience4j/resilience4j-framework-common/1.7.0) while upgrade to Hoxton.SR12. To fix this issue, we require to explicitly implement the dependency in gradle file of respective module. The reason for front50-gcs:compileTestKotlin FAILED is version conflict of com.google.cloud:google-cloud-storage:1.113.6 (upgraded as transitive dependency in Hoxton.SR12) versus pinned version of 1.108.0 in front50-gcs.gradle. To fix this issue, we require strict usage of old version google-cloud-storage (1.108.0) dependency by forcing it in gradle file.
- Loading branch information