All versions: 3.11 | 3.10 | 3.9 | Development versions: 3.12

Sometimes, you want to generate only tables. Or only routines. Or you want to exclude them from being generated. Whatever the use-case, there's a way to do this with the following, additional includes flags:

XML configuration (standalone and Maven)

<configuration xmlns="http://www.jooq.org/xsd/jooq-codegen-3.11.0.xsd">
  <generator>
    <database>
      <includeTables>true</includeTables>
      <includeRoutines>true</includeRoutines>
      <includePackages>true</includePackages>
      <includePackageRoutines>true</includePackageRoutines>
      <includePackageUDTs>true</includePackageUDTs>
      <includePackageConstants>true</includePackageConstants>
      <includeUDTs>true</includeUDTs>
      <includeSequences>false</includeSequences>
      <includePrimaryKeys>false</includePrimaryKeys>
      <includeUniqueKeys>false</includeUniqueKeys>
      <includeForeignKeys>false</includeForeignKeys>
    </database>
  </generator>
</configuration>

Programmatic configuration

configuration
  .withGenerator(new Generator(
    .withDatabase(new Database()
      .withIncludeTables(true)
      .withIncludeRoutines(true)
      .withIncludePackages(true)
      .withIncludePackageRoutines(true)
      .withIncludePackageUDTs(true)
      .withIncludePackageConstants(true)
      .withIncludeUDTs(true)
      .withIncludeSequences(false)
      .withIncludePrimaryKeys(false)
      .withIncludeUniqueKeys(false)
      .withIncludeForeignKeys(false))));

Gradle configuration

myConfigurationName(sourceSets.main) {
  generator {
    database {
      includeTables = true
      includeRoutines = true
      includePackages = true
      includePackageRoutines = true
      includePackageUDTs = true
      includePackageConstants = true
      includeUDTs = true
      includeSequences = false
      includePrimaryKeys = false
      includeUniqueKeys = false
      includeForeignKeys = false
    }
  }
}

By default, all these flags are set to true.

The jOOQ Logo