I have the following gradle task in my build.gradle.kts
. It's supposed to generate files from my JPA entities. However when running this task, upon succeeding, no file or directory is generated.
task(name = "generateJooq") {
doLast {
val configuration = Configuration().apply {
generator = Generator().apply {
database = Database().apply {
name = "org.jooq.util.jpa.JPADatabase"
properties = listOf(Property().apply {
key = "packages"
value = "com.example.sample"
})
}
target = Target().apply {
packageName = "com.example.jooq"
directory = "src/generated/java"
}
}
}
GenerationTool.generate(configuration)
}
}
This is my entity living under package com.example.sample
. Note that I wrote this entity in Java.
@Entity
public class Book {
@Id
private String id;
@Column
private String title;
}
Had the following logs
./gradlew clean generateJooq
BUILD SUCCESSFUL in 1s
2 actionable tasks: 2 executed