Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11
Output target configuration
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
                                        In the previous sections, we've seen the <target/> element which configures the location of your generated output. The following XML snippet illustrates some additional flags that can be specified in that section:
                                    
<configuration>
  <generator>
    <target>
      <packageName>org.jooq.your.packagename</packageName>
      <directory>/path/to/your/dir</directory>
      <encoding>UTF-8</encoding>
      <locale>de</locale>
      <clean>true</clean>
    </target>
  </generator>
</configuration>
See the configuration XSD, standalone code generation, and maven code generation for more details.
new org.jooq.meta.jaxb.Configuration()
  .withGenerator(new Generator()
    .withTarget(new Target()
      .withPackageName("org.jooq.your.packagename")
      .withDirectory("/path/to/your/dir")
      .withEncoding("UTF-8")
      .withLocale("de")
      .withClean(true)
    )
  )
See the configuration XSD and programmatic code generation for more details.
// The jOOQ-codegen-gradle plugin has been introduced in version 3.19 only.
// The jOOQ-codegen-gradle plugin has been introduced in version 3.19 only.
generationTool {
  generator {
    target {
      packageName = "org.jooq.your.packagename"
      directory = "/path/to/your/dir"
      encoding = "UTF-8"
      locale = "de"
      clean = true
    }
  }
}
See the configuration XSD and gradle code generation for more details.
- 
packageName: Specifies the root package name inside of which all generated code is located. This package is located inside of the <directory/>. The package name is part of the generator strategy and can be modified by a custom implementation, if so desired.
- directory: Specifies the root directoy inside of which all generated code is located.
- encoding: The encoding that should be used for generated classes.
- 
locale: The locale that should be used for locale-specific operations, such as String.toUpperCase(), e.g. by the default generator strategy.
- 
clean: Whether the target package (<packageName/>) should be cleaned to contain only generated code after a generation run. Defaults to true.

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