Open anewton1998 opened 5 years ago
I'm not sure as I am a maven user. The gradle snippet was provided a while ago by a vertx-jooq user. If you have a cleaner script, I'd be glad to replace the old documentation with your script.
I am running into the same issue now @anewton1998 did you get any further? I will update though as soon as I get somewhere
Imports should be removed and no need for JAXB JOOQ docs: https://www.jooq.org/doc/3.12/manual/code-generation/codegen-gradle/#N611F7
I was able to get the code generation running using the gradle-jooq-plugin in combination with the VertxGeneratorStrategy
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "org.postgresql:postgresql:42.2.10"
classpath "nu.studer:gradle-jooq-plugin:4.1"
classpath 'javax.xml.bind:jaxb-api:2.3.0'
classpath 'javax.activation:activation:1.1'
classpath 'org.glassfish.jaxb:jaxb-runtime:2.3.0'
}
}
apply plugin: "nu.studer.jooq"
dependencies {
jooqRuntime 'org.jooq:jooq-meta-extensions:3.11.4'
jooqRuntime "org.postgresql:postgresql:$postgresVersion"
jooqRuntime "io.github.jklingsporn:vertx-jooq-generate:$vertxJooqVersion"
}
jooq {
version = '3.12.3'
edition = 'OSS'
generateSchemaSourceOnCompilation = true
phoenix(sourceSets.main) {
generator {
name = 'io.github.jklingsporn.vertx.jooq.generate.completablefuture.CompletableFutureReactiveVertxGenerator'
strategy {
name = 'io.github.jklingsporn.vertx.jooq.generate.VertxGeneratorStrategy'
}
database {
name = 'org.jooq.meta.extensions.ddl.DDLDatabase'
properties {
property {
key = 'scripts'
value = 'src/main/resources/db/migration/V1__setup_tables.sql'
}
property {
key = 'sort'
value = 'semantic'
}
property {
key = 'unqualifiedSchema'
value = 'public'
}
property {
key = 'defaultNameCase'
value = 'lower'
}
}
}
generate {
relations = true
deprecated = false
records = true
immutablePojos = false
fluentSetters = true
}
target {
packageName = 'deen13.github.io.vertx'
}
}
}
}
In attempting to use the documentationvertx-jooq-rx-reactive/README.md for gradle, I see an import for GenerationTool, but that doesn't seem to be right. Is it really suppose to be
import org.jooq.codegen.GenerationTool
?