java-json-tools / json-schema-validator

A JSON Schema validation implementation in pure Java, which aims for correctness and performance, in that order
http://json-schema-validator.herokuapp.com/
Other
1.62k stars 399 forks source link

Conflicting Transitive Dependency Versions for Guava and Jsr305 #382

Open MHajoha opened 2 years ago

MHajoha commented 2 years ago

There are conflicting versions of Guava and jsr305 among this project's transitive dependencies. Since it is a common practice to enforce that all dependencies converge, this creates the need for exclusions in those projects when using json-schema-validator.

To view the conflicting dependencies, add the following to the build.gradle:

configurations.all {
    resolutionStrategy {
        // Fails the build if dependencies don't converge
        failOnVersionConflict()
    }
}

Then attempt to build the project. The output will be as follows:

Execution failed for task ':compileJava'.
> Could not resolve all dependencies for configuration ':compileClasspath'.
   > Conflict(s) found for the following module(s):
       - com.google.guava:guava between versions 28.2-android and 28.1-android
       - com.google.code.findbugs:jsr305 between versions 3.0.2 and 2.0.1
     Run with:
         --scan or
         :dependencyInsight --configuration compileClasspath --dependency com.google.guava:guava
     to get more insight on how to solve the conflict.