jooq-codegen-maven 的配置和使用

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0modelVersion>
   <groupId>com.fengye.examplegroupId>
   <artifactId>jooq-testartifactId>
   <version>1.0-SNAPSHOTversion>
   <profiles>
      <profile>
         
         <id>DBGenid>
         
         <build>
         <plugins>
            <plugin>
               <groupId>org.jooqgroupId>
               <artifactId>jooq-codegen-mavenartifactId>
               <version>3.8.6version>
               <executions>
                  <execution>
                     <goals>
                        <goal>generategoal>
                     goals>
                  execution>
               executions>
               <dependencies>
                  <dependency>
                     <groupId>mysqlgroupId>
                     <artifactId>mysql-connector-javaartifactId>
                     <version>5.1.39version>
                  dependency>
               dependencies>
               <configuration>
                  <jdbc>
                     <driver>com.mysql.jdbc.Driverdriver>
                     <url>jdbc:mysql://localhost:3307/taotaourl>
                     <user>rootuser>
                     <password>123456password>
                  jdbc>
                  <generator>
                     <database>
                        <name>org.jooq.util.mysql.MySQLDatabasename>
                        <includes>.*includes>
                        <excludes>excludes>
                        <inputSchema>taotaoinputSchema>
                     database>
                     <target>
                        
                        <packageName>com.fengye.example.generatedpackageName>
                        
                        <directory>target/generated-sources/jooqdirectory>
                     target>
                  generator>
               configuration>
            plugin>
         plugins>
         build>
      profile>
   profiles>
   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.pluginsgroupId>
            <artifactId>maven-compiler-pluginartifactId>
            <version>3.5.1version>
            <configuration>
               <source>1.6source>
               <target>1.6target>
               <encoding>UTF8encoding>
            configuration>
         plugin>
         
         <plugin>
            <groupId>org.codehaus.mojogroupId>
            <artifactId>build-helper-maven-pluginartifactId>
            <executions>
               <execution>
                  <phase>generate-sourcesphase>
                  <goals>
                     <goal>add-sourcegoal>
                  goals>
                  <configuration>
                     <sources>
                        <source>target/generated-sources/jooqsource>
                     sources>
                  configuration>
               execution>
            executions>
         plugin>
      
      plugins>
   build>
project>

转载于:https://my.oschina.net/u/930279/blog/793298

你可能感兴趣的:(jooq-codegen-maven 的配置和使用)