ci: 每个模块的mapper生成器配置

This commit is contained in:
CaptainB 2023-06-14 17:30:30 +08:00
parent 413fba51ba
commit 3f59c3ce1a
17 changed files with 306 additions and 32 deletions

View File

@ -432,6 +432,40 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/loadGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/sdkGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/projectGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/systemGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/uiGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/bugGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/apiGeneratorConfig.xml</configurationFile>
<configurationFile>src/main/resources/functionalGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.sdk.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.sdk.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.sdk.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.sdk.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.sdk.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.sdk.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -21,6 +21,36 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/apiGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.api.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.api.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.api.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.api.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.api.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.api.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -22,5 +22,35 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/bugGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.bug.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.bug.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.bug.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.bug.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.bug.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.bug.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -21,6 +21,36 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/apiGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.functional.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.functional.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.functional.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.functional.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.functional.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.functional.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -22,5 +22,35 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/loadGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.load.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.load.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.load.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.load.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.load.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.load.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -21,6 +21,36 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/projectGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.project.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.project.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.project.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.project.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.project.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.project.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -28,6 +28,36 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/systemGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.system.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.system.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.system.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.system.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.system.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.system.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>

View File

@ -22,5 +22,35 @@
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/apiGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -81,6 +81,36 @@
</dependency> </dependency>
</dependencies> </dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<verbose>true</verbose>
<overwrite>true</overwrite>
<configurationFile>src/main/resources/uiGeneratorConfig.xml</configurationFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.3.10</version>
</dependency>
<dependency>
<groupId>io.metersphere</groupId>
<artifactId>mybatis-tools</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> </project>

View File

@ -53,17 +53,17 @@
<property name="forceBigDecimals" value="false"/> <property name="forceBigDecimals" value="false"/>
</javaTypeResolver> </javaTypeResolver>
<!-- 模型对象 --> <!-- 模型对象 -->
<javaModelGenerator targetPackage="io.metersphere.ui.domain" targetProject="src/main/java"> <javaModelGenerator targetPackage="io.metersphere.ui.domain" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/> <property name="trimStrings" value="true"/>
</javaModelGenerator> </javaModelGenerator>
<!-- XML映射文件 --> <!-- XML映射文件 -->
<sqlMapGenerator targetPackage="io.metersphere.ui.mapper" targetProject="src/main/java"> <sqlMapGenerator targetPackage="io.metersphere.ui.mapper" targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</sqlMapGenerator> </sqlMapGenerator>
<!-- 接口 --> <!-- 接口 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.ui.mapper" <javaClientGenerator type="XMLMAPPER" targetPackage="io.metersphere.ui.mapper"
targetProject="src/main/java"> targetProject="../../framework/domain/src/main/java">
<property name="enableSubPackages" value="true"/> <property name="enableSubPackages" value="true"/>
</javaClientGenerator> </javaClientGenerator>