Search code examples
spring-bootgradlejooq

Jooq-codegen downgrade after set explicit version


I got a problem with jooq-codegen version.

In main build.gradle I got spring boot in 2.4.5 version and in dependency part:

implementation('org.springframework.boot:spring-boot-starter-jooq')

I also use dependencyMangement:

dependencyManagement {
    imports {
        mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies
        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
    }
}

and in child project build.gradle in dependency part I add version '3.14.8'

compile("org.jooq:jooq-codegen:3.14.8")

But after I run command:

 gw -q dependencies --configuration runtimeClasspath | grep jooq

I got this:

|    |    |    |    +--- org.jooq:jooq:3.14.8 -> 3.13.5
|    |    +--- org.springframework.boot:spring-boot-starter-jooq -> 2.4.5
|    |    |    \--- org.jooq:jooq:3.14.8 -> 3.13.5 (*)
|    |    +--- org.jooq:jooq-codegen:3.14.8 -> 3.13.5
|    |    |    +--- org.jooq:jooq:3.13.5 (*)
|    |    |    \--- org.jooq:jooq-meta:3.13.5
|    |    |         \--- org.jooq:jooq:3.13.5 (*)
|    |    +--- org.springframework.boot:spring-boot-starter-jooq -> 2.4.5 (*).   
|    +--- org.jooq:jooq-codegen:3.14.8 -> 3.13.5 (*)
|    +--- org.springframework.boot:spring-boot-starter-jooq -> 2.4.5 (*)
|    +--- org.springframework.boot:spring-boot-starter-jooq -> 2.4.5 (*)
|    +--- org.springframework.boot:spring-boot-starter-jooq -> 2.4.5 (*)

How can I fix this downgrade? And why is it happen?


Solution

  • I fix it in main build.gradle file adding:

    jooq {
      version = dependencyManagement.importedProperties['jooq.version']
    }
    

    and remove all explicit version from Gradle files