pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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.3</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. </modules>
  68. <dependencyManagement>
  69. <dependencies>
  70. <!-- spring boot 依赖 -->
  71. <dependency>
  72. <groupId>org.springframework.boot</groupId>
  73. <artifactId>spring-boot-dependencies</artifactId>
  74. <version>${spring-boot.version}</version>
  75. <type>pom</type>
  76. <scope>import</scope>
  77. </dependency>
  78. <!--web 模块-->
  79. <dependency>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-starter-web</artifactId>
  82. <version>${spring-boot.version}</version>
  83. <exclusions>
  84. <!--排除tomcat依赖-->
  85. <exclusion>
  86. <artifactId>spring-boot-starter-tomcat</artifactId>
  87. <groupId>org.springframework.boot</groupId>
  88. </exclusion>
  89. </exclusions>
  90. </dependency>
  91. <!--kxs 公共版本定义-->
  92. <dependency>
  93. <groupId>com.kxs</groupId>
  94. <artifactId>kxs-common-core</artifactId>
  95. <version>${kxs.common.version}</version>
  96. </dependency>
  97. <!--kxs 异步日志-->
  98. <dependency>
  99. <groupId>com.kxs</groupId>
  100. <artifactId>kxs-common-log</artifactId>
  101. <version>${kxs.common.version}</version>
  102. </dependency>
  103. <!--hutool bom 工具类-->
  104. <dependency>
  105. <groupId>cn.hutool</groupId>
  106. <artifactId>hutool-bom</artifactId>
  107. <version>${hutool.version}</version>
  108. <type>pom</type>
  109. <scope>import</scope>
  110. </dependency>
  111. <!--springdoc -->
  112. <dependency>
  113. <groupId>com.github.xiaoymin</groupId>
  114. <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
  115. <version>${knife4j.version}</version>
  116. </dependency>
  117. <dependency>
  118. <groupId>org.springdoc</groupId>
  119. <artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
  120. <version>${springdoc.version}</version>
  121. </dependency>
  122. <!--orm 相关-->
  123. <dependency>
  124. <groupId>com.baomidou</groupId>
  125. <artifactId>mybatis-plus-boot-starter</artifactId>
  126. <version>${mybatis-plus.version}</version>
  127. </dependency>
  128. <dependency>
  129. <groupId>com.mysql</groupId>
  130. <artifactId>mysql-connector-j</artifactId>
  131. <version>${mysql.version}</version>
  132. </dependency>
  133. <dependency>
  134. <groupId>com.baomidou</groupId>
  135. <artifactId>mybatis-plus-extension</artifactId>
  136. <version>${mybatis-plus.version}</version>
  137. </dependency>
  138. <dependency>
  139. <groupId>com.baomidou</groupId>
  140. <artifactId>mybatis-plus-annotation</artifactId>
  141. <version>${mybatis-plus.version}</version>
  142. </dependency>
  143. <!-- 多数据源依赖 -->
  144. <dependency>
  145. <groupId>com.baomidou</groupId>
  146. <artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
  147. <version>${dynamic-ds.version}</version>
  148. </dependency>
  149. <!-- excel 导入导出 -->
  150. <dependency>
  151. <groupId>com.pig4cloud.excel</groupId>
  152. <artifactId>excel-spring-boot-starter</artifactId>
  153. <version>${excel.version}</version>
  154. </dependency>
  155. <!-- 鉴权 -->
  156. <dependency>
  157. <groupId>com.kxs</groupId>
  158. <artifactId>kxs-common-security</artifactId>
  159. <version>${project.version}</version>
  160. </dependency>
  161. <dependency>
  162. <groupId>com.kxs</groupId>
  163. <artifactId>kxs-common-mybatis</artifactId>
  164. <version>${project.version}</version>
  165. </dependency>
  166. <!-- 系统管理模块 -->
  167. <dependency>
  168. <groupId>com.kxs</groupId>
  169. <artifactId>kxs-system-api</artifactId>
  170. <version>${project.version}</version>
  171. </dependency>
  172. <dependency>
  173. <groupId>com.kxs</groupId>
  174. <artifactId>kxs-system-biz</artifactId>
  175. <version>${project.version}</version>
  176. </dependency>
  177. </dependencies>
  178. </dependencyManagement>
  179. <build>
  180. <finalName>${project.name}</finalName>
  181. <resources>
  182. <resource>
  183. <directory>src/main/resources</directory>
  184. <filtering>true</filtering>
  185. </resource>
  186. </resources>
  187. <pluginManagement>
  188. <plugins>
  189. <plugin>
  190. <groupId>org.springframework.boot</groupId>
  191. <artifactId>spring-boot-maven-plugin</artifactId>
  192. <version>${spring-boot.version}</version>
  193. <configuration>
  194. <finalName>${project.build.finalName}</finalName>
  195. <layers>
  196. <enabled>true</enabled>
  197. </layers>
  198. </configuration>
  199. <executions>
  200. <execution>
  201. <goals>
  202. <goal>repackage</goal>
  203. </goals>
  204. </execution>
  205. </executions>
  206. </plugin>
  207. </plugins>
  208. </pluginManagement>
  209. <plugins>
  210. <plugin>
  211. <groupId>org.apache.maven.plugins</groupId>
  212. <artifactId>maven-compiler-plugin</artifactId>
  213. <version>${maven-compiler-plugin.version}</version>
  214. <configuration>
  215. <debug>false</debug>
  216. <compilerArgs>
  217. <arg>-parameters</arg>
  218. </compilerArgs>
  219. </configuration>
  220. </plugin>
  221. <!--打包jar 与git commit 关联插件-->
  222. <plugin>
  223. <groupId>io.github.git-commit-id</groupId>
  224. <artifactId>git-commit-id-maven-plugin</artifactId>
  225. <version>${git.commit.plugin}</version>
  226. <executions>
  227. <execution>
  228. <id>get-the-git-infos</id>
  229. <phase>initialize</phase>
  230. </execution>
  231. </executions>
  232. <configuration>
  233. <failOnNoGitDirectory>false</failOnNoGitDirectory>
  234. <generateGitPropertiesFile>true</generateGitPropertiesFile>
  235. <!--因为项目定制了jackson的日期时间序列化/反序列化格式,因此这里要进行配置,不然通过management.info.git.mode=full进行完整git信息监控时会存在问题-->
  236. <dateFormat>yyyy-MM-dd HH:mm:ss</dateFormat>
  237. <includeOnlyProperties>
  238. <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
  239. <includeOnlyProperty>^git.commit.(id|message|time).*$</includeOnlyProperty>
  240. </includeOnlyProperties>
  241. </configuration>
  242. </plugin>
  243. <!--
  244. 代码格式插件,默认使用spring 规则,可运行命令进行项目格式化:./mvnw spring-javaformat:apply 或 mvn spring-javaformat:apply,可在IDEA中安装插件以下插件进行自动格式化:
  245. https://repo1.maven.org/maven2/io/spring/javaformat/spring-javaformat-intellij-idea-plugin
  246. -->
  247. <plugin>
  248. <groupId>io.spring.javaformat</groupId>
  249. <artifactId>spring-javaformat-maven-plugin</artifactId>
  250. <version>${spring.checkstyle.plugin}</version>
  251. <executions>
  252. <execution>
  253. <phase>validate</phase>
  254. <inherited>true</inherited>
  255. </execution>
  256. </executions>
  257. </plugin>
  258. </plugins>
  259. </build>
  260. <profiles>
  261. <profile>
  262. <id>dev</id>
  263. <activation>
  264. <!-- 默认环境 -->
  265. <activeByDefault>true</activeByDefault>
  266. </activation>
  267. </profile>
  268. <profile>
  269. <id>test</id>
  270. <activation>
  271. <!-- 默认环境 -->
  272. <activeByDefault>true</activeByDefault>
  273. </activation>
  274. </profile>
  275. <profile>
  276. <id>prod</id>
  277. <activation>
  278. <!-- 默认环境 -->
  279. <activeByDefault>true</activeByDefault>
  280. </activation>
  281. </profile>
  282. </profiles>
  283. </project>