Available in versions: Dev (3.20) | Latest (3.19)

This is experimental functionality, and as such subject to change. Use at your own risk!

Multiple executions

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

To emulate Maven's useful plugin <executions/> semantics, where a plugin can be configured to be executed multiple times, jOOQ-codegen-gradle also offers an executions {} element, which generates gradle tasks. Such a setup can be configured like this:

Kotlin
Groovy
jooq {

    // Common configuration to be shared by all executions
    configuration {
        // ...
    }

    executions {
        create("main") {
            configuration {
                // ...
            }
        }

        create("other") {
            configuration {
                // ...
            }
        }
    }
}

See the configuration XSD or the manual's various sections about code generation for more details.

jooq {

    // Common configuration to be shared by all executions
    configuration {
        // ...
    }

    executions {
        main {
            configuration {
                // ...
            }
        }

        other {
            configuration {
                // ...
            }
        }
    }
}

See the configuration XSD or the manual's various sections about code generation for more details.

As these executions simply translate to gradle tasks, you can now either run them all together, or individually.

gradle tasks

Produces:

JOOQ tasks
----------
jooqCodegen - jOOQ code generation for all executions
jooqCodegenMain - jOOQ code generation for main execution
jooqCodegenOther - jOOQ code generation for other execution

References to this page

Feedback

Do you have any feedback about this page? We'd love to hear it!

The jOOQ Logo