pom.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <!-- Spring Boot 父级依赖 -->
  7. <parent>
  8. <groupId>cn.sikey.cloud</groupId>
  9. <artifactId>sikey-mcdisk-business</artifactId>
  10. <version>2.3.0-SNAPSHOT</version>
  11. </parent>
  12. <artifactId>sikey-mcdisk-business-biz</artifactId>
  13. <version>2.3.0-SNAPSHOT</version>
  14. <packaging>jar</packaging>
  15. <name>${project.artifactId}</name>
  16. <description>
  17. sikey-mcdisk-biz
  18. </description>
  19. <properties>
  20. <java.version>23</java.version>
  21. <maven.compiler.source>${java.version}</maven.compiler.source>
  22. <maven.compiler.target>${java.version}</maven.compiler.target>
  23. <consul.version>4.2.0</consul.version>
  24. <lombok.version>1.18.36</lombok.version>
  25. <logback.version>1.2.12</logback.version>
  26. <mapstruct.version>1.6.2</mapstruct.version>
  27. <spring.cloud.version>2024.0.0</spring.cloud.version>
  28. <spring.boot.version>3.4.0</spring.boot.version>
  29. <skywalking.version>9.0.0</skywalking.version>
  30. <opentracing.version>0.33.0</opentracing.version>
  31. <revision>2.3.0-SNAPSHOT</revision>
  32. <maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
  33. <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
  34. <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
  35. <okhttp3.version>4.12.0</okhttp3.version>
  36. <hutool.version>5.8.28</hutool.version>
  37. <google.zxing.version>3.5.2</google.zxing.version>
  38. <gson.version>2.11.0</gson.version>
  39. <security.version>3.4.4</security.version>
  40. </properties>
  41. <dependencies>
  42. <!-- Web 开发基础依赖 -->
  43. <dependency>
  44. <groupId>cn.sikey.cloud</groupId>
  45. <artifactId>sikey-spring-boot-starter-web</artifactId>
  46. </dependency>
  47. <!-- Spring Cloud Consul 配置中心 -->
  48. <dependency>
  49. <groupId>org.springframework.cloud</groupId>
  50. <artifactId>spring-cloud-starter-consul-config</artifactId>
  51. </dependency>
  52. <!-- Spring Cloud Consul 服务发现 -->
  53. <dependency>
  54. <groupId>org.springframework.cloud</groupId>
  55. <artifactId>spring-cloud-starter-consul-discovery</artifactId>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.projectlombok</groupId>
  59. <artifactId>lombok</artifactId>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.mapstruct</groupId>
  63. <artifactId>mapstruct</artifactId>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.mapstruct</groupId>
  67. <artifactId>mapstruct-jdk8</artifactId>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.mapstruct</groupId>
  71. <artifactId>mapstruct-processor</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.skywalking</groupId>
  75. <artifactId>apm-toolkit-trace</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.apache.skywalking</groupId>
  79. <artifactId>apm-toolkit-logback-1.x</artifactId>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.apache.skywalking</groupId>
  83. <artifactId>apm-toolkit-opentracing</artifactId>
  84. </dependency>
  85. <dependency>
  86. <groupId>io.opentracing</groupId>
  87. <artifactId>opentracing-api</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>io.opentracing</groupId>
  91. <artifactId>opentracing-util</artifactId>
  92. </dependency>
  93. <dependency>
  94. <groupId>io.opentracing</groupId>
  95. <artifactId>opentracing-noop</artifactId>
  96. </dependency>
  97. <dependency>
  98. <groupId>com.squareup.okhttp3</groupId>
  99. <artifactId>okhttp</artifactId>
  100. <version>${okhttp3.version}</version>
  101. </dependency>
  102. <dependency>
  103. <groupId>com.squareup.okhttp3</groupId>
  104. <artifactId>logging-interceptor</artifactId>
  105. <version>${okhttp3.version}</version>
  106. </dependency>
  107. <!-- Hutool 核心库 -->
  108. <dependency>
  109. <groupId>cn.hutool</groupId>
  110. <artifactId>hutool-all</artifactId>
  111. <version>${hutool.version}</version>
  112. </dependency>
  113. <dependency>
  114. <groupId>cn.hutool</groupId>
  115. <artifactId>hutool-core</artifactId>
  116. <version>${hutool.version}</version>
  117. </dependency>
  118. <!-- 参数校验 -->
  119. <dependency>
  120. <groupId>org.springframework.boot</groupId>
  121. <artifactId>spring-boot-starter-validation</artifactId>
  122. </dependency>
  123. <!-- DB 相关 -->
  124. <dependency>
  125. <groupId>cn.sikey.cloud</groupId>
  126. <artifactId>sikey-spring-boot-starter-mybatis</artifactId>
  127. </dependency>
  128. <!-- Redis 相关 -->
  129. <dependency>
  130. <groupId>cn.sikey.cloud</groupId>
  131. <artifactId>sikey-spring-boot-starter-redis</artifactId>
  132. </dependency>
  133. <!-- RPC 远程调用相关 -->
  134. <dependency>
  135. <groupId>org.springframework.cloud</groupId>
  136. <artifactId>spring-cloud-starter-loadbalancer</artifactId>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.springframework.cloud</groupId>
  140. <artifactId>spring-cloud-starter-openfeign</artifactId>
  141. </dependency>
  142. <dependency>
  143. <groupId>io.github.openfeign</groupId>
  144. <artifactId>feign-okhttp</artifactId>
  145. </dependency>
  146. <dependency>
  147. <groupId>cn.sikey.cloud</groupId>
  148. <artifactId>sikey-selenium-business-api</artifactId>
  149. <version>${revision}</version>
  150. </dependency>
  151. </dependencies>
  152. <repositories>
  153. <!--<repository>
  154. <id>nexus-snapshots</id> &lt;!&ndash; 关键:此 ID 必须与 settings.xml 中的 <server> 的 <id> 一致 &ndash;&gt;
  155. <url>http://106.75.230.4:18081/repository/maven-public/</url>
  156. </repository>
  157. <repository>
  158. <id>nexus-releases</id> &lt;!&ndash; 关键:此 ID 必须与 settings.xml 中的 <server> 的 <id> 一致 &ndash;&gt;
  159. <url>http://106.75.230.4:18081/repository/maven-public/</url>
  160. </repository>-->
  161. <!--<repository>
  162. <id>sikey-group</id>
  163. <url>http://106.75.230.4:18081/repository/sikey-group/</url>
  164. <snapshots>
  165. <enabled>true</enabled>
  166. </snapshots>
  167. <releases>
  168. <enabled>true</enabled>
  169. </releases>
  170. </repository>-->
  171. </repositories>
  172. <build>
  173. <!-- 设置构建的 jar 包名 -->
  174. <finalName>${project.artifactId}</finalName>
  175. <pluginManagement>
  176. <plugins>
  177. <!-- maven-surefire-plugin 插件,用于运行单元测试。 -->
  178. <!-- 注意,需要使用 3.0.X+,因为要支持 Junit 5 版本 -->
  179. <plugin>
  180. <groupId>org.apache.maven.plugins</groupId>
  181. <artifactId>maven-surefire-plugin</artifactId>
  182. <version>${maven-surefire-plugin.version}</version>
  183. </plugin>
  184. <!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
  185. <!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
  186. <plugin>
  187. <groupId>org.apache.maven.plugins</groupId>
  188. <artifactId>maven-compiler-plugin</artifactId>
  189. <version>${maven-compiler-plugin.version}</version>
  190. <configuration>
  191. <annotationProcessorPaths>
  192. <path>
  193. <groupId>org.springframework.boot</groupId>
  194. <artifactId>spring-boot-configuration-processor</artifactId>
  195. <version>${spring.boot.version}</version>
  196. </path>
  197. <path>
  198. <groupId>org.projectlombok</groupId>
  199. <artifactId>lombok</artifactId>
  200. <version>${lombok.version}</version>
  201. </path>
  202. <path>
  203. <groupId>org.mapstruct</groupId>
  204. <artifactId>mapstruct-processor</artifactId>
  205. <version>${mapstruct.version}</version>
  206. </path>
  207. </annotationProcessorPaths>
  208. <!-- 编译参数写在 arg 内,解决 Spring Boot 3.2 的 Parameter Name Discovery 问题 -->
  209. <debug>false</debug>
  210. <compilerArgs>
  211. <arg>-parameters</arg>
  212. </compilerArgs>
  213. </configuration>
  214. </plugin>
  215. </plugins>
  216. </pluginManagement>
  217. <plugins>
  218. <!-- 统一 revision 版本 -->
  219. <plugin>
  220. <groupId>org.codehaus.mojo</groupId>
  221. <artifactId>flatten-maven-plugin</artifactId>
  222. <version>${flatten-maven-plugin.version}</version>
  223. <configuration>
  224. <flattenMode>oss</flattenMode>
  225. <updatePomFile>true</updatePomFile>
  226. </configuration>
  227. <executions>
  228. <execution>
  229. <goals>
  230. <goal>flatten</goal>
  231. </goals>
  232. <id>flatten</id>
  233. <phase>process-resources</phase>
  234. </execution>
  235. <execution>
  236. <goals>
  237. <goal>clean</goal>
  238. </goals>
  239. <id>flatten.clean</id>
  240. <phase>clean</phase>
  241. </execution>
  242. </executions>
  243. </plugin>
  244. <!-- 关键:添加 spring-boot-maven-plugin -->
  245. <plugin>
  246. <groupId>org.springframework.boot</groupId>
  247. <artifactId>spring-boot-maven-plugin</artifactId>
  248. <version>${spring.boot.version}</version>
  249. <executions>
  250. <execution>
  251. <goals>
  252. <goal>repackage</goal>
  253. </goals>
  254. </execution>
  255. </executions>
  256. </plugin>
  257. </plugins>
  258. <!--<resources>
  259. <resource>
  260. <directory>src/main/resources</directory>
  261. <includes>
  262. <include>**/*.*</include> &lt;!&ndash; 包含 PEM 文件 &ndash;&gt;
  263. </includes>
  264. </resource>
  265. </resources>-->
  266. </build>
  267. </project>