Closed doctorpangloss closed 3 years ago
You should use this style of example instead, it works finally:
buildscript {
ext {
vertx_jooq_version = '5.2.0'
postgresql_version = '42.2.16'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath "io.github.jklingsporn:vertx-jooq-generate:$vertx_jooq_version"
classpath "org.postgresql:postgresql:$postgresql_version"
}
}
import org.jooq.codegen.GenerationTool
import org.jooq.meta.jaxb.*
def configuration = new Configuration()
configuration
.withJdbc(new Jdbc()
.withDriver('org.postgresql.Driver')
.withUrl('jdbc:postgresql://host:5432/databasename')
.withUser('username')
.withPassword('password'))
.withGenerator(new Generator()
.withName('io.github.jklingsporn.vertx.jooq.generate.classic.ClassicReactiveVertxGenerator')
.withDatabase(new Database()
.withName('org.jooq.meta.postgres.PostgresDatabase')
.withInputSchema('public')
.withIncludeTables(true)
.withIncludeRoutines(true)
.withIncludePackages(false)
.withIncludeUDTs(true)
.withIncludeSequences(true)
.withExcludes('schema_version')
.withIncludes('.*'))
.withGenerate(new Generate()
.withDeprecated(false)
.withRecords(false)
.withInterfaces(true)
.withFluentSetters(true)
.withPojos(true)
.withDaos(true))
.withTarget(new Target()
.withPackageName('package.name')
.withDirectory("$projectDir/src/generated/java"))
.withStrategy(new Strategy()
.withName('io.github.jklingsporn.vertx.jooq.generate.VertxGeneratorStrategy')))
GenerationTool.generate(configuration)
Thanks! As I am a maven user, this is very helpful.
Benjamin Berman notifications@github.com schrieb am So., 6. Sept. 2020, 03:29:
You should use this style of example instead:
def configuration = new Configuration() configuration .withJdbc(new Jdbc() .withDriver('org.postgresql.Driver') .withUrl('jdbc:postgresql://host:5432/databasename') .withUser('username') .withPassword('password')) .withGenerator(new Generator() .withName('io.github.jklingsporn.vertx.jooq.generate.classic.ClassicReactiveVertxGenerator') .withDatabase(new Database() .withName('org.jooq.meta.postgres.PostgresDatabase') .withInputSchema('public') .withIncludeTables(true) .withIncludeRoutines(true) .withIncludePackages(false) .withIncludeUDTs(true) .withIncludeSequences(true) .withExcludes('schema_version') .withIncludes('.*')) .withGenerate(new Generate() .withDeprecated(false) .withRecords(false) .withInterfaces(true) .withFluentSetters(true) .withPojos(true) .withDaos(true)) .withTarget(new Target() .withPackageName('package.name') .withDirectory("$projectDir/src/generated/java")) .withStrategy(new Strategy() .withName('io.github.jklingsporn.vertx.jooq.generate.VertxGeneratorStrategy')))
GenerationTool.generate(configuration)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jklingsporn/vertx-jooq/issues/164#issuecomment-687684905, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQLZXSXPMWKNVYRNHQYL6LSELQXBANCNFSM4Q3TZG5A .
The @doctorpangloss example works like a charm. It should be in the vertx-jooq-rx-reactive
readme to better understanding.
People receiving errors can go straight to the workaround below.
It's a great package! However it errors out with
Also you need to add
to the buildscript's dependencies.