New versions: Dev (3.14) | Latest (3.13) | 3.12 | 3.11 | 3.10 | 3.9 | 3.8 | Old versions: 3.7 | 3.6 | 3.5 | 3.4

Running the code generator with Ant

Applies to ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

Run generation with Ant

When running code generation with ant's <java/> task, you may have to set fork="true":

<!-- Run the code generation task -->
<target name="generate-test-classes">
  <java fork="true" 
    <arg value="/path/to/configuration.xml"/>
      <pathelement location="/path/to/jooq-3.4.7.jar"/>
      <pathelement location="/path/to/jooq-meta-3.4.7.jar"/>
      <pathelement location="/path/to/jooq-codegen-3.4.7.jar"/>

Using the Ant Maven plugin

Sometimes, ant can be useful to work around a limitation (misunderstanding?) of the Maven build. Just as with the above standalone ant usage example, the jOOQ code generator can be called from the maven-antrun-plugin:

<!-- Run the code generation task -->
          <java fork="true" 
              <arg value="/path/to/configuration.xml"/>
      <!-- JDBC driver -->
The jOOQ Logo