Advertisement
Guest User

Untitled

a guest
Nov 12th, 2015
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.90 KB | None | 0 0
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>com.squareup.JooqTest</groupId>
  5. <artifactId>jooqtest</artifactId>
  6. <packaging>jar</packaging>
  7. <version>1.0-SNAPSHOT</version>
  8. <name>jooqtest</name>
  9. <url>http://maven.apache.org</url>
  10. <build>
  11. <plugins>
  12. <plugin>
  13. <version>3.1</version>
  14. <groupId>org.apache.maven.plugins</groupId>
  15. <artifactId>maven-compiler-plugin</artifactId>
  16. <configuration>
  17. <!-- or whatever version you use -->
  18. <source>1.8</source>
  19. <target>1.8</target>
  20. </configuration>
  21. </plugin>
  22.  
  23. <plugin>
  24. <groupId>org.codehaus.mojo</groupId>
  25. <artifactId>sql-maven-plugin</artifactId>
  26. <version>1.5</version>
  27. <dependencies>
  28. <dependency>
  29. <groupId>mysql</groupId>
  30. <artifactId>mysql-connector-java</artifactId>
  31. <version>5.1.35</version>
  32. </dependency>
  33. </dependencies>
  34. <executions>
  35. <execution>
  36. <phase>initialize</phase>
  37. <goals>
  38. <goal>execute</goal>
  39. </goals>
  40.  
  41. <configuration>
  42. <driver>com.mysql.jdbc.Driver</driver>
  43. <url>jdbc:mysql://localhost/</url>
  44. <username>root</username>
  45. <autocommit>true</autocommit>
  46. <sqlCommand>
  47. DROP DATABASE IF EXISTS jooqtest;
  48. CREATE DATABASE jooqtest;
  49. USE jooqtest;
  50. CREATE TABLE t1 (id INT primary key, date timestamp);
  51. CREATE TABLE t2 (id INT primary key, date INT);
  52. </sqlCommand>
  53. </configuration>
  54. </execution>
  55. </executions>
  56. </plugin>
  57.  
  58. <plugin>
  59. <groupId>org.jooq</groupId>
  60. <artifactId>jooq-codegen-maven</artifactId>
  61. <version>3.6.2</version>
  62.  
  63. <executions>
  64. <execution>
  65. <phase>generate-sources</phase>
  66. <goals>
  67. <goal>generate</goal>
  68. </goals>
  69. <configuration>
  70. <jdbc>
  71. <driver>com.mysql.jdbc.Driver</driver>
  72. <url>jdbc:mysql://localhost/jooqtest</url>
  73. <user>root</user>
  74. </jdbc>
  75.  
  76. <generator>
  77. <name>org.jooq.util.JavaGenerator</name>
  78. <database>
  79. <name>org.jooq.util.mysql.MySQLDatabase</name>
  80. <includes>.*</includes>
  81. <excludes>mysql.*</excludes>
  82. <inputSchema>jooqtest</inputSchema>
  83. <customTypes>
  84. <customType>
  85. <name>com.squareup.JooqTest.TimestampConverter</name>
  86. <type>java.lang.Integer</type>
  87. <converter>com.squareup.JooqTest.TimestampConverter</converter>
  88. </customType>
  89. </customTypes>
  90. <forcedTypes>
  91. <forcedType>
  92. <name>com.squareup.JooqTest.TimestampConverter</name>
  93. <types>(?:timestamp.*)</types>
  94. </forcedType>
  95. </forcedTypes>
  96. </database>
  97. <target>
  98. <packageName>jooqtest</packageName>
  99. </target>
  100. </generator>
  101. </configuration>
  102. </execution>
  103. </executions>
  104. </plugin>
  105. </plugins>
  106. </build>
  107. <dependencies>
  108. <dependency>
  109. <groupId>log4j</groupId>
  110. <artifactId>log4j</artifactId>
  111. <version>1.2.17</version>
  112. </dependency>
  113. <dependency>
  114. <groupId>junit</groupId>
  115. <artifactId>junit</artifactId>
  116. <version>3.8.1</version>
  117. <scope>test</scope>
  118. </dependency>
  119. <dependency>
  120. <groupId>com.google.guava</groupId>
  121. <artifactId>guava</artifactId>
  122. <version>18.0</version>
  123. </dependency>
  124. <dependency>
  125. <groupId>org.jooq</groupId>
  126. <artifactId>jooq</artifactId>
  127. <version>3.6.2</version>
  128. </dependency>
  129. <dependency>
  130. <groupId>org.jooq</groupId>
  131. <artifactId>jooq-meta</artifactId>
  132. <version>3.6.2</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.jooq</groupId>
  136. <artifactId>jooq-codegen</artifactId>
  137. <version>3.6.2</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.codehaus.mojo</groupId>
  141. <artifactId>sql-maven-plugin</artifactId>
  142. <version>1.5</version>
  143. </dependency>
  144. <dependency>
  145. <groupId>mysql</groupId>
  146. <artifactId>mysql-connector-java</artifactId>
  147. <version>5.1.35</version>
  148. </dependency>
  149. </dependencies>
  150. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement