|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
3 | | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
4 | | - <modelVersion>4.0.0</modelVersion> |
5 | | - |
6 | | - <groupId>com.clevergang</groupId> |
7 | | - <artifactId>java-repo-layer-comparison</artifactId> |
8 | | - <version>0.0.1-SNAPSHOT</version> |
9 | | - <packaging>jar</packaging> |
10 | | - |
11 | | - <name>java-repo-layer-comparison</name> |
12 | | - <description>Comparison of non-JPA SQL mapping frameworks for Java (Jooq, Spring JDBCTemplate etc.)</description> |
13 | | - |
14 | | - <parent> |
15 | | - <groupId>org.springframework.boot</groupId> |
16 | | - <artifactId>spring-boot-starter-parent</artifactId> |
17 | | - <version>1.3.2.RELEASE</version> |
18 | | - <relativePath/> <!-- lookup parent from repository --> |
19 | | - </parent> |
20 | | - |
21 | | - <properties> |
22 | | - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
23 | | - <java.version>1.8</java.version> |
24 | | - </properties> |
25 | | - |
26 | | - <dependencies> |
27 | | - <dependency> |
28 | | - <groupId>org.springframework.boot</groupId> |
29 | | - <artifactId>spring-boot-starter-jdbc</artifactId> |
30 | | - </dependency> |
31 | | - <dependency> |
32 | | - <groupId>org.springframework.boot</groupId> |
33 | | - <artifactId>spring-boot-starter-jooq</artifactId> |
34 | | - </dependency> |
35 | | - <dependency> |
36 | | - <groupId>org.springframework.boot</groupId> |
37 | | - <artifactId>spring-boot-starter-test</artifactId> |
38 | | - <scope>test</scope> |
39 | | - </dependency> |
| 3 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 4 | + <modelVersion>4.0.0</modelVersion> |
| 5 | + |
| 6 | + <groupId>com.clevergang</groupId> |
| 7 | + <artifactId>java-repo-layer-comparison</artifactId> |
| 8 | + <version>0.0.1-SNAPSHOT</version> |
| 9 | + <packaging>jar</packaging> |
| 10 | + |
| 11 | + <name>java-repo-layer-comparison</name> |
| 12 | + <description>Comparison of non-JPA SQL mapping frameworks for Java (Jooq, Spring JDBCTemplate etc.)</description> |
| 13 | + |
| 14 | + <parent> |
| 15 | + <groupId>org.springframework.boot</groupId> |
| 16 | + <artifactId>spring-boot-starter-parent</artifactId> |
| 17 | + <version>1.3.2.RELEASE</version> |
| 18 | + <relativePath/> <!-- lookup parent from repository --> |
| 19 | + </parent> |
| 20 | + |
| 21 | + <properties> |
| 22 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 23 | + <java.version>1.8</java.version> |
| 24 | + </properties> |
| 25 | + |
| 26 | + <dependencies> |
| 27 | + <dependency> |
| 28 | + <groupId>org.springframework.boot</groupId> |
| 29 | + <artifactId>spring-boot-starter-jdbc</artifactId> |
| 30 | + </dependency> |
| 31 | + <dependency> |
| 32 | + <groupId>org.springframework.boot</groupId> |
| 33 | + <artifactId>spring-boot-starter-jooq</artifactId> |
| 34 | + </dependency> |
| 35 | + <dependency> |
| 36 | + <groupId>org.springframework.boot</groupId> |
| 37 | + <artifactId>spring-boot-starter-test</artifactId> |
| 38 | + <scope>test</scope> |
| 39 | + </dependency> |
40 | 40 |
|
41 | 41 | <dependency> |
42 | 42 | <groupId>org.postgresql</groupId> |
43 | 43 | <artifactId>postgresql</artifactId> |
| 44 | + <version>9.4-1201-jdbc41</version> |
44 | 45 | <scope>runtime</scope> |
45 | 46 | </dependency> |
| 47 | + |
46 | 48 | <dependency> |
47 | 49 | <groupId>org.apache.commons</groupId> |
48 | 50 | <artifactId>commons-lang3</artifactId> |
49 | 51 | <version>3.4</version> |
50 | 52 | </dependency> |
51 | 53 | </dependencies> |
52 | | - |
53 | | - <build> |
54 | | - <plugins> |
55 | | - <plugin> |
56 | | - <groupId>org.springframework.boot</groupId> |
57 | | - <artifactId>spring-boot-maven-plugin</artifactId> |
58 | | - </plugin> |
59 | | - </plugins> |
60 | | - </build> |
61 | | - |
| 54 | + |
| 55 | + <build> |
| 56 | + <plugins> |
| 57 | + <plugin> |
| 58 | + <groupId>org.springframework.boot</groupId> |
| 59 | + <artifactId>spring-boot-maven-plugin</artifactId> |
| 60 | + </plugin> |
| 61 | + |
| 62 | + <!-- You can use this plugin to generate classes needed by Jooq --> |
| 63 | + <!-- Just run it using 'mvn jooq-codegen:generate' --> |
| 64 | + <!-- Generated classes will go to ./src/main/java/com/clevergang/dbtests/service/repository/impl/jooq/generated --> |
| 65 | + <plugin> |
| 66 | + |
| 67 | + <!-- Specify the maven code generator plugin --> |
| 68 | + <groupId>org.jooq</groupId> |
| 69 | + <artifactId>jooq-codegen-maven</artifactId> |
| 70 | + <version>3.7.2</version> |
| 71 | + |
| 72 | + <!-- The plugin should hook into the generate goal --> |
| 73 | + <executions> |
| 74 | + <execution> |
| 75 | + <goals> |
| 76 | + <goal>generate</goal> |
| 77 | + </goals> |
| 78 | + </execution> |
| 79 | + </executions> |
| 80 | + |
| 81 | + <!-- Manage the plugin's dependency. In this example, we'll use a PostgreSQL database --> |
| 82 | + <dependencies> |
| 83 | + <dependency> |
| 84 | + <groupId>org.postgresql</groupId> |
| 85 | + <artifactId>postgresql</artifactId> |
| 86 | + <version>9.4-1201-jdbc41</version> |
| 87 | + </dependency> |
| 88 | + </dependencies> |
| 89 | + |
| 90 | + <!-- Specify the plugin configuration. |
| 91 | + The configuration format is the same as for the standalone code generator --> |
| 92 | + <configuration> |
| 93 | + <!-- Configure the database connection here --> |
| 94 | + <jdbc> |
| 95 | + <driver>org.postgresql.Driver</driver> |
| 96 | + <url>jdbc:postgresql://localhost:5432/testdb</url> |
| 97 | + <user>test</user> |
| 98 | + <password>test</password> |
| 99 | + </jdbc> |
| 100 | + |
| 101 | + <generator> |
| 102 | + <!-- The default code generator. You can override this one, to generate your own code style. |
| 103 | + Supported generators: |
| 104 | + - org.jooq.util.JavaGenerator |
| 105 | + - org.jooq.util.ScalaGenerator |
| 106 | + Defaults to org.jooq.util.JavaGenerator --> |
| 107 | + <name>org.jooq.util.JavaGenerator</name> |
| 108 | + |
| 109 | + <database> |
| 110 | + <!-- The database type. The format here is: |
| 111 | + org.util.[database].[database]Database --> |
| 112 | + <name>org.jooq.util.postgres.PostgresDatabase</name> |
| 113 | + |
| 114 | + <!-- The database schema (or in the absence of schema support, in your RDBMS this |
| 115 | + can be the owner, user, database name) to be generated --> |
| 116 | + <inputSchema>public</inputSchema> |
| 117 | + |
| 118 | + <!-- All elements that are generated from your schema |
| 119 | + (A Java regular expression. Use the pipe to separate several expressions) |
| 120 | + Watch out for case-sensitivity. Depending on your database, this might be important! --> |
| 121 | + <includes>.*</includes> |
| 122 | + |
| 123 | + <!-- All elements that are excluded from your schema |
| 124 | + (A Java regular expression. Use the pipe to separate several expressions). |
| 125 | + Excludes match before includes --> |
| 126 | + <!--<excludes></excludes>--> |
| 127 | + </database> |
| 128 | + |
| 129 | + <target> |
| 130 | + <!-- The destination package of your generated classes (within the destination directory) --> |
| 131 | + <packageName>com.clevergang.dbtests.service.repository.impl.jooq.generated</packageName> |
| 132 | + |
| 133 | + <!-- The destination directory of your generated classes --> |
| 134 | + <directory>./src/main/java/</directory> |
| 135 | + </target> |
| 136 | + </generator> |
| 137 | + </configuration> |
| 138 | + </plugin> |
| 139 | + |
| 140 | + |
| 141 | + </plugins> |
| 142 | + </build> |
| 143 | + |
62 | 144 |
|
63 | 145 | </project> |
0 commit comments