Well, what about this? Why did you do this?

ext {
  // use jOOQ version defined in Spring Boot
  jooqVersion = dependencyManagement.importedProperties['jooq.version']
}

configurations.classpath {
  // Enforce the jOOQ configuration XML schema version
  resolutionStrategy.eachDependency {
    if (requested.group == 'org.jooq' && requested.name.startsWith('jooq'))
{
      useVersion jooqVersion
    }
  }
}

On Fri, Jun 21, 2024 at 3:41 PM Debapriya Patra <debapriya.pa...@gmail.com>
wrote:

> Hi,
>
> If you look at my gradle code, I have clearly mentioned
> "org.jooq:jooq-codegen-gradle:3.19.10" . So from where its picking the 
> org.jooq:jooq-codegen-gradle:3.18.17
> ?
>
> Thanks,
>
> On Friday, June 21, 2024 at 12:48:41 AM UTC-7 lukas...@gmail.com wrote:
>
>> Hi,
>>
>> The answer is here:
>> Could not find org.jooq:jooq-codegen-gradle:3.18.17.
>>
>> The plugin was first released in 3.19.0
>>
>> I hope this helps.
>>
>>
>> On Fri, Jun 21, 2024 at 6:38 AM Debapriya Patra <debapri...@gmail.com>
>> wrote:
>>
>>> Hello,
>>>
>>> I am trying to use the Jooq official codegen gradle plugin instead of a
>>> third party plugin, but I am having issues.
>>>
>>> I am getting below error
>>>
>>> ```
>>> * What went wrong:
>>> A problem occurred evaluating script.
>>> > Could not resolve all artifacts for configuration 'classpath'.
>>>    > Could not find org.jooq:jooq-codegen-gradle:3.18.17.
>>>      Searched in the following locations:
>>>        -
>>> https://plugins.gradle.org/m2/org/jooq/jooq-codegen-gradle/3.18.17/jooq-codegen-gradle-3.18.17.pom
>>>      Required by:
>>>          unspecified:unspecified:unspecified
>>>
>>> * Try:
>>> > If the artifact you are trying to retrieve can be found in the
>>> repository but without metadata in 'Maven POM' format, you need to adjust
>>> the 'metadataSources { ... }' of the repository declaration.
>>> ```
>>>
>>>
>>> Here is my *jooq.gradle*
>>>
>>> ```
>>> import org.jooq.meta.jaxb.Logging
>>>
>>> buildscript {
>>> repositories {
>>> gradlePluginPortal()
>>> }
>>> dependencies {
>>> classpath "org.jooq:jooq-codegen-gradle:3.19.10"
>>> }
>>> ext {
>>> // use jOOQ version defined in Spring Boot
>>> jooqVersion = dependencyManagement.importedProperties['jooq.version']
>>> }
>>> configurations.classpath {
>>> // Enforce the jOOQ configuration XML schema version
>>> resolutionStrategy.eachDependency {
>>> if (requested.group == 'org.jooq' && requested.name.startsWith('jooq'))
>>> {
>>> useVersion jooqVersion
>>> }
>>> }
>>> }
>>> }
>>>
>>> apply plugin: 'org.jooq.jooq-codegen'
>>>
>>> // JOOQ dependencies
>>> dependencies {
>>> implementation 'org.springframework.boot:spring-boot-starter-jooq'
>>> jooqGenerator 'com.mysql:mysql-connector-j'
>>> jooqGenerator 'org.slf4j:slf4j-simple'
>>>
>>> jooqGenerator 'com.fasterxml.jackson.core:jackson-databind'
>>> jooqGenerator "org.testcontainers:mysql"
>>> jooqGenerator 'org.testcontainers:jdbc'
>>> }
>>>
>>> jooq {
>>> version = jooqVersion
>>> configuration {
>>> logging = Logging.WARN
>>> jdbc {
>>> driver = 'com.mysql.cj.jdbc.Driver'
>>> }
>>> generator {
>>> name = 'org.jooq.codegen.DefaultGenerator'
>>> database {
>>> name = 'org.jooq.meta.mysql.MySQLDatabase'
>>> inputSchema = 'lmsdb'
>>> schemata {
>>> schema {
>>> inputSchema = 'lmsdb'
>>> }
>>> }
>>> }
>>> generate {
>>> records = true
>>> immutablePojos = true
>>> fluentSetters = true
>>> javaTimeTypes = false
>>> }
>>> target {
>>> packageName = "com.chegg.${mainPackageName}.db"
>>> }
>>> strategy {
>>> name = 'org.jooq.codegen.DefaultGeneratorStrategy'
>>> }
>>> }
>>> }
>>> }
>>> ```
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "jOOQ User Group" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jooq-user+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jooq-user/b2c622cc-604d-4622-ab69-e4a888a51a1an%40googlegroups.com
>>> <https://groups.google.com/d/msgid/jooq-user/b2c622cc-604d-4622-ab69-e4a888a51a1an%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "jOOQ User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jooq-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jooq-user/a3ea46da-7061-4b36-ad43-817369ce4d8en%40googlegroups.com
> <https://groups.google.com/d/msgid/jooq-user/a3ea46da-7061-4b36-ad43-817369ce4d8en%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jooq-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jooq-user/CAB4ELO4XYBX5W8aN-gxgvYQUftt2X9f7oXwzB3aVrQN%2B6fs3-w%40mail.gmail.com.

Reply via email to