pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  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. <groupId>com.kxs</groupId>
  6. <artifactId>kxs</artifactId>
  7. <name>${project.artifactId}</name>
  8. <version>1.1.0</version>
  9. <packaging>pom</packaging>
  10. <properties>
  11. <spring-boot.version>3.1.5</spring-boot.version>
  12. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  13. <maven.compiler.source>17</maven.compiler.source>
  14. <maven.compiler.target>17</maven.compiler.target>
  15. <captcha.version>2.2.3</captcha.version>
  16. <jasypt.version>3.0.5</jasypt.version>
  17. <jaxb.version>2.3.5</jaxb.version>
  18. <spring.authorization.version>1.1.2</spring.authorization.version>
  19. <swagger.fox.version>3.0.0</swagger.fox.version>
  20. <springdoc.version>2.2.0</springdoc.version>
  21. <swagger.core.version>2.2.14</swagger.core.version>
  22. <git.commit.plugin>6.0.0</git.commit.plugin>
  23. <spring.checkstyle.plugin>0.0.39</spring.checkstyle.plugin>
  24. <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
  25. <log4j2.version>2.17.1</log4j2.version>
  26. <fastjson.version>1.2.83</fastjson.version>
  27. <excel.version>3.1.0</excel.version>
  28. <hutool.version>5.8.21</hutool.version>
  29. <mybatis-plus.version>3.5.3.2</mybatis-plus.version>
  30. <mysql.version>8.0.33</mysql.version>
  31. <dynamic-ds.version>4.1.3</dynamic-ds.version>
  32. <kxs.common.version>${project.version}</kxs.common.version>
  33. <knife4j.version>4.3.0</knife4j.version>
  34. </properties>
  35. <!-- 以下依赖 全局所有的模块都会引入 -->
  36. <dependencies>
  37. <!--配置文件处理器-->
  38. <dependency>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-configuration-processor</artifactId>
  41. <optional>true</optional>
  42. </dependency>
  43. <!--Lombok-->
  44. <dependency>
  45. <groupId>org.projectlombok</groupId>
  46. <artifactId>lombok</artifactId>
  47. <scope>provided</scope>
  48. </dependency>
  49. <!-- JAVA 17 -->
  50. <dependency>
  51. <groupId>com.sun.xml.bind</groupId>
  52. <artifactId>jaxb-impl</artifactId>
  53. <version>${jaxb.version}</version>
  54. </dependency>
  55. <!--测试依赖-->
  56. <dependency>
  57. <groupId>org.springframework.boot</groupId>
  58. <artifactId>spring-boot-starter-test</artifactId>
  59. <scope>test</scope>
  60. </dependency>
  61. </dependencies>
  62. <modules>
  63. <module>kxs-common</module>
  64. <module>kxs-admin</module>
  65. <module>kxs-app</module>
  66. <module>kxs-system</module>
  67. <module>kxs-codegen</module>
  68. </modules>
  69. <dependencyManagement>
  70. <dependencies>
  71. <!-- spring boot 依赖 -->
  72. <dependency>
  73. <groupId>org.springframework.boot</groupId>
  74. <artifactId>spring-boot-dependencies</artifactId>
  75. <version>${spring-boot.version}</version>
  76. <type>pom</type>
  77. <scope>import</scope>
  78. </dependency>
  79. <!--web 模块-->
  80. <dependency>
  81. <groupId>org.springframework.boot</groupId>
  82. <artifactId>spring-boot-starter-web</artifactId>
  83. <version>${spring-boot.version}</version>
  84. <exclusions>
  85. <!--排除tomcat依赖-->
  86. <exclusion>
  87. <artifactId>spring-boot-starter-tomcat</artifactId>
  88. <groupId>org.springframework.boot</groupId>
  89. </exclusion>
  90. </exclusions>
  91. </dependency>
  92. <!--kxs 公共版本定义-->
  93. <dependency>
  94. <groupId>com.kxs</groupId>
  95. <artifactId>kxs-common-core</artifactId>
  96. <version>${kxs.common.version}</version>
  97. </dependency>
  98. <!--kxs 异步日志-->
  99. <dependency>
  100. <groupId>com.kxs</groupId>
  101. <artifactId>kxs-common-log</artifactId>
  102. <version>${kxs.common.version}</version>
  103. </dependency>
  104. <!--hutool bom 工具类-->
  105. <dependency>
  106. <groupId>cn.hutool</groupId>
  107. <artifactId>hutool-bom</artifactId>
  108. <version>${hutool.version}</version>
  109. <type>pom</type>
  110. <scope>import</scope>
  111. </dependency>
  112. <!--springdoc -->
  113. <dependency>
  114. <groupId>com.github.xiaoymin</groupId>
  115. <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
  116. <version>${knife4j.version}</version>
  117. </dependency>
  118. <dependency>
  119. <groupId>org.springdoc</groupId>
  120. <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
  121. <version>${springdoc.version}</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>io.swagger.core.v3</groupId>
  125. <artifactId>swagger-annotations-jakarta</artifactId>
  126. <version>${swagger.core.version}</version>
  127. </dependency>
  128. <!--orm 相关-->
  129. <dependency>
  130. <groupId>com.baomidou</groupId>
  131. <artifactId>mybatis-plus-boot-starter</artifactId>
  132. <version>${mybatis-plus.version}</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>com.mysql</groupId>
  136. <artifactId>mysql-connector-j</artifactId>
  137. <version>${mysql.version}</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>com.baomidou</groupId>
  141. <artifactId>mybatis-plus-extension</artifactId>
  142. <version>${mybatis-plus.version}</version>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.baomidou</groupId>
  146. <artifactId>mybatis-plus-annotation</artifactId>
  147. <version>${mybatis-plus.version}</version>
  148. </dependency>
  149. <!-- 多数据源依赖 -->
  150. <dependency>
  151. <groupId>com.baomidou</groupId>
  152. <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
  153. <version>${dynamic-ds.version}</version>
  154. </dependency>
  155. <!-- 数据源配置-->
  156. <dependency>
  157. <groupId>com.kxs</groupId>
  158. <artifactId>kxs-common-datasource</artifactId>
  159. <version>${project.version}</version>
  160. </dependency>
  161. <!-- excel 导入导出 -->
  162. <dependency>
  163. <groupId>com.pig4cloud.excel</groupId>
  164. <artifactId>excel-spring-boot-starter</artifactId>
  165. <version>${excel.version}</version>
  166. </dependency>
  167. <!-- 鉴权 -->
  168. <dependency>
  169. <groupId>com.kxs</groupId>
  170. <artifactId>kxs-common-security</artifactId>
  171. <version>${project.version}</version>
  172. </dependency>
  173. <dependency>
  174. <groupId>com.kxs</groupId>
  175. <artifactId>kxs-common-mybatis</artifactId>
  176. <version>${project.version}</version>
  177. </dependency>
  178. <!-- 系统管理模块 -->
  179. <dependency>
  180. <groupId>com.kxs</groupId>
  181. <artifactId>kxs-system-api</artifactId>
  182. <version>${project.version}</version>
  183. </dependency>
  184. <dependency>
  185. <groupId>com.kxs</groupId>
  186. <artifactId>kxs-system-biz</artifactId>
  187. <version>${project.version}</version>
  188. </dependency>
  189. <dependency>
  190. <groupId>com.kxs</groupId>
  191. <artifactId>kxs-codegen</artifactId>
  192. <version>${project.version}</version>
  193. </dependency>
  194. </dependencies>
  195. </dependencyManagement>
  196. <build>
  197. <finalName>${project.name}</finalName>
  198. <resources>
  199. <resource>
  200. <directory>src/main/resources</directory>
  201. <filtering>true</filtering>
  202. </resource>
  203. </resources>
  204. <pluginManagement>
  205. <plugins>
  206. <plugin>
  207. <groupId>org.springframework.boot</groupId>
  208. <artifactId>spring-boot-maven-plugin</artifactId>
  209. <version>${spring-boot.version}</version>
  210. <configuration>
  211. <finalName>${project.build.finalName}</finalName>
  212. <layers>
  213. <enabled>true</enabled>
  214. </layers>
  215. </configuration>
  216. <executions>
  217. <execution>
  218. <goals>
  219. <goal>repackage</goal>
  220. </goals>
  221. </execution>
  222. </executions>
  223. </plugin>
  224. </plugins>
  225. </pluginManagement>
  226. <plugins>
  227. <plugin>
  228. <groupId>org.apache.maven.plugins</groupId>
  229. <artifactId>maven-compiler-plugin</artifactId>
  230. <version>${maven-compiler-plugin.version}</version>
  231. <configuration>
  232. <debug>false</debug>
  233. <compilerArgs>
  234. <arg>-parameters</arg>
  235. </compilerArgs>
  236. </configuration>
  237. </plugin>
  238. <!--打包jar 与git commit 关联插件-->
  239. <plugin>
  240. <groupId>io.github.git-commit-id</groupId>
  241. <artifactId>git-commit-id-maven-plugin</artifactId>
  242. <version>${git.commit.plugin}</version>
  243. <executions>
  244. <execution>
  245. <id>get-the-git-infos</id>
  246. <phase>initialize</phase>
  247. </execution>
  248. </executions>
  249. <configuration>
  250. <failOnNoGitDirectory>false</failOnNoGitDirectory>
  251. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  252. <!--因为项目定制了jackson的日期时间序列化/反序列化格式,因此这里要进行配置,不然通过management.info.git.mode=full进行完整git信息监控时会存在问题-->
  253. <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
  254. <includeOnlyProperties>
  255. <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
  256. <includeOnlyProperty>^git.commit.(id|message|time).*$</includeOnlyProperty>
  257. </includeOnlyProperties>
  258. </configuration>
  259. </plugin>
  260. <!--
  261. 代码格式插件,默认使用spring 规则,可运行命令进行项目格式化:./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply,可在IDEA中安装插件以下插件进行自动格式化:
  262. https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin
  263. -->
  264. <plugin>
  265. <groupId>io.spring.javaformat</groupId>
  266. <artifactId>spring-javaformat-maven-plugin</artifactId>
  267. <version>${spring.checkstyle.plugin}</version>
  268. <executions>
  269. <execution>
  270. <phase>validate</phase>
  271. <inherited>true</inherited>
  272. </execution>
  273. </executions>
  274. </plugin>
  275. </plugins>
  276. </build>
  277. <profiles>
  278. <profile>
  279. <id>dev</id>
  280. <activation>
  281. <!-- 默认环境 -->
  282. <activeByDefault>true</activeByDefault>
  283. </activation>
  284. </profile>
  285. <profile>
  286. <id>test</id>
  287. <activation>
  288. <!-- 默认环境 -->
  289. <activeByDefault>true</activeByDefault>
  290. </activation>
  291. </profile>
  292. <profile>
  293. <id>prod</id>
  294. <activation>
  295. <!-- 默认环境 -->
  296. <activeByDefault>true</activeByDefault>
  297. </activation>
  298. </profile>
  299. </profiles>
  300. </project>