Cannot apply plugin jooq-codegen-gradle

39 views
Skip to first unread message

Simone Cacciatore

unread,
Apr 2, 2024, 11:07:35 AMApr 2
to jOOQ User Group
Hi everyone

I've downloaded the trial version of jooq pro for java 8 (because I need the support to Oracle) and I am trying to use the official plugin but till now I had no success.

I have installed the downloaded jars in my local maven with the provided script maven-install and then added the mavenLocal repo to my repository both for libraries and plugins.

Then I have added the plugin to my gradle build :
plugins {
id "org.jooq.trial-java-8.jooq-codegen-gradle" version "3.19.6"
}
and the dependencies like that

dependencies {
implementation "org.jooq.trial-java-8:jooq-codegen:${jooqVersion}"
implementation "org.jooq.trial-java-8:jooq-meta:${jooqVersion}"
implementation "${jdbcDriverDependency}"

implementation "org.jooq.trial-java-8:jooq:${jooqVersion}"

jooq localGroovy()
jooq fileTree(dir: "../../buildSrc/build/libs", include: '*.jar')
}

If I try to build or generate I have the following error:

Build file '/home/cacciatore/DEV/livebase/cloudlet/workgroupDatabase/workgroup-database.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'org.jooq.trial-java-8.jooq-codegen-gradle', version: '3.19.6']
> Failed to apply plugin 'org.jooq.trial-java-8.jooq-codegen-gradle'.
   > Could not create an instance of type org.jooq.codegen.gradle.NamedConfiguration.
      > Could not generate a decorated class for type NamedConfiguration.
         > org/jooq/meta/jaxb/Configuration

Seems that some depedency of the plugin is not satisfied, but I have no clue how to fix 

Thanks in advance

Lukas Eder

unread,
Apr 3, 2024, 5:39:33 AMApr 3
to jooq...@googlegroups.com
Hi Simone

I'm assuming you installed the trial's jar file to your local Maven repository. Did you set up your gradle repositories as follows?

build.gradle.kts

    repositories {
        mavenLocal()
        mavenCentral()
    }

settings.gradle.kts

    pluginManagement {
        repositories {
            mavenLocal()
            gradlePluginPortal()
        }
    }

Best regards,
Lukas

--
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/64a604b7-c9ce-4df8-95c2-5d65fce7834fn%40googlegroups.com.

Lukas Eder

unread,
Apr 3, 2024, 5:40:35 AMApr 3
to jooq...@googlegroups.com
I see you're using a local path to place jar files on your classpath. To add files to the code generation plugin's classpath, please use:

dependencies {

    // Code generation specific dependencies, like JDBC drivers, codegen extensions, etc.
    jooqCodegen "..."
}

See also:

hantsy bai

unread,
Apr 8, 2024, 2:34:35 AMApr 8
to jooq...@googlegroups.com
Add ` jaxb ` to jooqCodeGen scope, check my example: https://github.com/hantsy/spring-r2dbc-sample/blob/master/jooq-kotlin-co-gradle/build.gradle.kts#L46
---

Regards,

Hantsy Bai

Self-employed consultant, fullstack developer, agile coach, freelancer/remote worker

GitHub: https://github.com/hantsy

Twitter: https://twitter.com/@hantsy

Medium: https://medium.com/@hantsy


--
Reply all
Reply to author
Forward
0 new messages