pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361
  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. <parent>
  6. <groupId>cn.sikey.cloud</groupId>
  7. <artifactId>sikey</artifactId>
  8. <version>2.3.0-SNAPSHOT</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>sikey-gateway-business-biz</artifactId>
  12. <packaging>jar</packaging>
  13. <name>${project.artifactId}</name>
  14. <description>API 服务网关,基于 Spring Cloud Gateway 实现</description>
  15. <properties>
  16. <java.version>23</java.version>
  17. <maven.compiler.source>${java.version}</maven.compiler.source>
  18. <maven.compiler.target>${java.version}</maven.compiler.target>
  19. <consul.version>4.2.0</consul.version>
  20. <spring.cloud.gateway.version>4.2.0</spring.cloud.gateway.version>
  21. <!--<spring.cloud.alibaba.version>2023.0.1.0</spring.cloud.alibaba.version>-->
  22. <lombok.version>1.18.36</lombok.version>
  23. <logback.version>1.2.12</logback.version>
  24. <mapstruct.version>1.6.2</mapstruct.version>
  25. <spring.cloud.version>2024.0.0</spring.cloud.version>
  26. <spring.boot.version>3.4.0</spring.boot.version>
  27. <skywalking.version>9.0.0</skywalking.version>
  28. <opentracing.version>0.33.0</opentracing.version>
  29. <revision>2.3.0-SNAPSHOT</revision>
  30. <maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
  31. <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
  32. <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
  33. <okhttp3.version>4.12.0</okhttp3.version>
  34. <hutool.version>5.8.28</hutool.version>
  35. <google.zxing.version>3.5.2</google.zxing.version>
  36. <alipay.v3.version>3.0.0.ALL</alipay.v3.version>
  37. <wechat.v3.version>0.2.16</wechat.v3.version>
  38. <gson.version>2.11.0</gson.version>
  39. <security.version>3.4.4</security.version>
  40. <commons-codec.version>1.15</commons-codec.version>
  41. </properties>
  42. <dependencyManagement>
  43. <dependencies>
  44. <dependency>
  45. <groupId>org.springframework.cloud</groupId>
  46. <artifactId>spring-cloud-dependencies</artifactId>
  47. <version>${spring.cloud.version}</version>
  48. <type>pom</type>
  49. <scope>import</scope>
  50. </dependency>
  51. </dependencies>
  52. </dependencyManagement>
  53. <dependencies>
  54. <!-- Gateway 网关相关 -->
  55. <dependency>
  56. <groupId>org.springframework.cloud</groupId>
  57. <artifactId>spring-cloud-starter-gateway</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-webflux</artifactId>
  62. <version>${spring.boot.version}</version>
  63. </dependency>
  64. <!-- Web 开发基础依赖 -->
  65. <!--<dependency>
  66. <groupId>cn.sikey.cloud</groupId>
  67. <artifactId>sikey-spring-boot-starter-web</artifactId>
  68. <version>${revision}</version>
  69. </dependency>-->
  70. <!-- Registry 注册中心相关 -->
  71. <!--<dependency>
  72. <groupId>com.alibaba.cloud</groupId>
  73. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  74. </dependency>-->
  75. <!-- Config 配置中心相关 -->
  76. <!--<dependency>
  77. <groupId>com.alibaba.cloud</groupId>
  78. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  79. </dependency>-->
  80. <!-- Spring Cloud Consul 配置中心 -->
  81. <dependency>
  82. <groupId>org.springframework.cloud</groupId>
  83. <artifactId>spring-cloud-starter-consul-config</artifactId>
  84. <version>${consul.version}</version>
  85. </dependency>
  86. <!-- Spring Cloud Consul 服务发现 -->
  87. <dependency>
  88. <groupId>org.springframework.cloud</groupId>
  89. <artifactId>spring-cloud-starter-consul-discovery</artifactId>
  90. <version>${consul.version}</version>
  91. </dependency>
  92. <dependency>
  93. <groupId>cn.sikey.cloud</groupId>
  94. <artifactId>sikey-common</artifactId>
  95. <version>2.3.0-SNAPSHOT</version>
  96. </dependency>
  97. <dependency>
  98. <groupId>org.projectlombok</groupId>
  99. <artifactId>lombok</artifactId>
  100. <version>${lombok.version}</version>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.mapstruct</groupId>
  104. <artifactId>mapstruct</artifactId>
  105. <version>${mapstruct.version}</version>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.mapstruct</groupId>
  109. <artifactId>mapstruct-jdk8</artifactId>
  110. <version>${mapstruct.version}</version>
  111. </dependency>
  112. <dependency>
  113. <groupId>org.mapstruct</groupId>
  114. <artifactId>mapstruct-processor</artifactId>
  115. <version>${mapstruct.version}</version>
  116. </dependency>
  117. <dependency>
  118. <groupId>org.apache.skywalking</groupId>
  119. <artifactId>apm-toolkit-trace</artifactId>
  120. <version>${skywalking.version}</version>
  121. </dependency>
  122. <dependency>
  123. <groupId>org.apache.skywalking</groupId>
  124. <artifactId>apm-toolkit-logback-1.x</artifactId>
  125. <version>${skywalking.version}</version>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.apache.skywalking</groupId>
  129. <artifactId>apm-toolkit-opentracing</artifactId>
  130. <version>${skywalking.version}</version>
  131. </dependency>
  132. <dependency>
  133. <groupId>io.opentracing</groupId>
  134. <artifactId>opentracing-api</artifactId>
  135. <version>${opentracing.version}</version>
  136. </dependency>
  137. <dependency>
  138. <groupId>io.opentracing</groupId>
  139. <artifactId>opentracing-util</artifactId>
  140. <version>${opentracing.version}</version>
  141. </dependency>
  142. <dependency>
  143. <groupId>io.opentracing</groupId>
  144. <artifactId>opentracing-noop</artifactId>
  145. <version>${opentracing.version}</version>
  146. </dependency>
  147. <dependency>
  148. <groupId>com.squareup.okhttp3</groupId>
  149. <artifactId>okhttp</artifactId>
  150. <version>${okhttp3.version}</version>
  151. </dependency>
  152. <!-- Hutool 核心库 -->
  153. <dependency>
  154. <groupId>cn.hutool</groupId>
  155. <artifactId>hutool-all</artifactId>
  156. <version>${hutool.version}</version>
  157. </dependency>
  158. <dependency>
  159. <groupId>cn.hutool</groupId>
  160. <artifactId>hutool-core</artifactId>
  161. <version>${hutool.version}</version>
  162. </dependency>
  163. <!-- 显式添加 Gson -->
  164. <dependency>
  165. <groupId>com.google.code.gson</groupId>
  166. <artifactId>gson</artifactId>
  167. <version>${gson.version}</version>
  168. </dependency>
  169. <!--<dependency>
  170. <groupId>org.apache.tomcat.embed</groupId>
  171. <artifactId>tomcat-embed-core</artifactId>
  172. </dependency>-->
  173. <dependency>
  174. <groupId>commons-codec</groupId>
  175. <artifactId>commons-codec</artifactId>
  176. <version>${commons-codec.version}</version>
  177. </dependency>
  178. <dependency>
  179. <groupId>ch.qos.logback</groupId>
  180. <artifactId>logback-core</artifactId>
  181. <version>1.5.12</version>
  182. </dependency>
  183. <dependency>
  184. <groupId>ch.qos.logback</groupId>
  185. <artifactId>logback-classic</artifactId>
  186. <version>1.5.12</version>
  187. </dependency>
  188. <dependency>
  189. <groupId>org.slf4j</groupId>
  190. <artifactId>slf4j-api</artifactId>
  191. <version>2.0.16</version>
  192. </dependency>
  193. <!-- RPC 远程调用相关 -->
  194. <!--<dependency>
  195. <groupId>org.springframework.cloud</groupId>
  196. <artifactId>spring-cloud-starter-loadbalancer</artifactId>
  197. <version>4.1.1</version>
  198. </dependency>
  199. <dependency>
  200. <groupId>org.springframework.cloud</groupId>
  201. <artifactId>spring-cloud-starter-openfeign</artifactId>
  202. <version>4.1.1</version>
  203. </dependency>
  204. <dependency>
  205. <groupId>io.github.openfeign</groupId>
  206. <artifactId>feign-okhttp</artifactId>
  207. <version>12.5</version>
  208. </dependency>-->
  209. <!--<dependency>
  210. <groupId>org.springframework.boot</groupId>
  211. <artifactId>spring-boot-starter-data-jpa</artifactId>
  212. <version>3.4.4</version>
  213. </dependency>-->
  214. <!--<dependency>
  215. <groupId>org.springframework.boot</groupId>
  216. <artifactId>spring-boot-starter-security</artifactId>
  217. <version>${security.version}</version>
  218. </dependency>-->
  219. </dependencies>
  220. <repositories>
  221. <!--<repository>
  222. <id>nexus-snapshots</id> &lt;!&ndash; 关键:此 ID 必须与 settings.xml 中的 <server> 的 <id> 一致 &ndash;&gt;
  223. <url>http://106.75.230.4:18081/repository/maven-public/</url>
  224. </repository>
  225. <repository>
  226. <id>nexus-releases</id> &lt;!&ndash; 关键:此 ID 必须与 settings.xml 中的 <server> 的 <id> 一致 &ndash;&gt;
  227. <url>http://106.75.230.4:18081/repository/maven-public/</url>
  228. </repository>-->
  229. <!--<repository>
  230. <id>sikey-group</id>
  231. <url>http://106.75.230.4:18081/repository/sikey-group/</url>
  232. <snapshots>
  233. <enabled>true</enabled>
  234. </snapshots>
  235. <releases>
  236. <enabled>true</enabled>
  237. </releases>
  238. </repository>-->
  239. </repositories>
  240. <build>
  241. <!-- 设置构建的 jar 包名 -->
  242. <finalName>${project.artifactId}</finalName>
  243. <pluginManagement>
  244. <plugins>
  245. <!-- maven-surefire-plugin 插件,用于运行单元测试。 -->
  246. <!-- 注意,需要使用 3.0.X+,因为要支持 Junit 5 版本 -->
  247. <plugin>
  248. <groupId>org.apache.maven.plugins</groupId>
  249. <artifactId>maven-surefire-plugin</artifactId>
  250. <version>${maven-surefire-plugin.version}</version>
  251. </plugin>
  252. <!-- maven-compiler-plugin 插件,解决 Lombok + MapStruct 组合 -->
  253. <!-- https://stackoverflow.com/questions/33483697/re-run-spring-boot-configuration-annotation-processor-to-update-generated-metada -->
  254. <plugin>
  255. <groupId>org.apache.maven.plugins</groupId>
  256. <artifactId>maven-compiler-plugin</artifactId>
  257. <version>${maven-compiler-plugin.version}</version>
  258. <configuration>
  259. <annotationProcessorPaths>
  260. <path>
  261. <groupId>org.springframework.boot</groupId>
  262. <artifactId>spring-boot-configuration-processor</artifactId>
  263. <version>${spring.boot.version}</version>
  264. </path>
  265. <path>
  266. <groupId>org.projectlombok</groupId>
  267. <artifactId>lombok</artifactId>
  268. <version>${lombok.version}</version>
  269. </path>
  270. <path>
  271. <groupId>org.mapstruct</groupId>
  272. <artifactId>mapstruct-processor</artifactId>
  273. <version>${mapstruct.version}</version>
  274. </path>
  275. </annotationProcessorPaths>
  276. <!-- 编译参数写在 arg 内,解决 Spring Boot 3.2 的 Parameter Name Discovery 问题 -->
  277. <debug>false</debug>
  278. <compilerArgs>
  279. <arg>-parameters</arg>
  280. </compilerArgs>
  281. </configuration>
  282. </plugin>
  283. </plugins>
  284. </pluginManagement>
  285. <plugins>
  286. <!-- 统一 revision 版本 -->
  287. <plugin>
  288. <groupId>org.codehaus.mojo</groupId>
  289. <artifactId>flatten-maven-plugin</artifactId>
  290. <version>${flatten-maven-plugin.version}</version>
  291. <configuration>
  292. <flattenMode>oss</flattenMode>
  293. <updatePomFile>true</updatePomFile>
  294. </configuration>
  295. <executions>
  296. <execution>
  297. <goals>
  298. <goal>flatten</goal>
  299. </goals>
  300. <id>flatten</id>
  301. <phase>process-resources</phase>
  302. </execution>
  303. <execution>
  304. <goals>
  305. <goal>clean</goal>
  306. </goals>
  307. <id>flatten.clean</id>
  308. <phase>clean</phase>
  309. </execution>
  310. </executions>
  311. </plugin>
  312. <!-- 关键:添加 spring-boot-maven-plugin -->
  313. <plugin>
  314. <groupId>org.springframework.boot</groupId>
  315. <artifactId>spring-boot-maven-plugin</artifactId>
  316. <version>${spring.boot.version}</version>
  317. <executions>
  318. <execution>
  319. <goals>
  320. <goal>repackage</goal>
  321. </goals>
  322. </execution>
  323. </executions>
  324. </plugin>
  325. </plugins>
  326. </build>
  327. </project>