Skip to content

Instantly share code, notes, and snippets.

@sanity
Created March 4, 2012 21:52
Show Gist options
  • Save sanity/cfd8a0556dd441ab43ff to your computer and use it in GitHub Desktop.
Save sanity/cfd8a0556dd441ab43ff to your computer and use it in GitHub Desktop.
<build>
<plugins>
<plugin>
<!-- Specify the maven code generator plugin -->
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>2.0.5</version>
<!-- The plugin should hook into the generate goal -->
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<!-- Manage the plugin's dependency. In this example, we'll use a Postgres
database -->
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.18</version>
</dependency>
</dependencies>
<!-- Specify the plugin configuration -->
<configuration>
<!-- JDBC connection parameters -->
<jdbc>
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://localhost/amplify</url>
<user>amplify</user>
<password>amptest</password>
</jdbc>
<!-- Generator parameters -->
<generator>
<name>org.jooq.util.DefaultGenerator</name>
<database>
<name>org.jooq.util.postgres.PostgresDatabase</name>
<includes>.*</includes>
<excludes></excludes>
<inputSchema>public</inputSchema>
</database>
<generate>
<relations>true</relations>
<deprecated>false</deprecated>
</generate>
<target>
<packageName>amplify.jooq</packageName>
<directory>target/generated-sources/amplify</directory>
</target>
</generator>
</configuration>
</plugin>
</plugins>
</build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment