pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  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.itlym.platform</groupId>
  7. <artifactId>shoulder-platform-common</artifactId>
  8. <version>1.0-SNAPSHOT</version><!-- shoulder-platform-version -->
  9. <relativePath>../pom.xml</relativePath>
  10. </parent>
  11. <modelVersion>4.0.0</modelVersion>
  12. <artifactId>shoulder-platform-parent</artifactId>
  13. <packaging>pom</packaging>
  14. <name>${project.artifactId}</name>
  15. <description>shoulder platform 的通用父类,管理了平台的技术选型和通用配置</description>
  16. <url>https://github.com/ChinaLym/shoulder-platform</url>
  17. <properties>
  18. <java.version>17</java.version>
  19. <maven.compiler.source>${java.version}</maven.compiler.source>
  20. <maven.compiler.target>${java.version}</maven.compiler.target>
  21. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  22. <maven.javadoc.charset>${project.build.sourceEncoding}</maven.javadoc.charset>
  23. <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
  24. <!-- =============== Shoulder 版本 =============== -->
  25. <shoulder.version>0.8.1</shoulder.version><!-- shoulder-version -->
  26. <shoulder-platform.version>1.0-SNAPSHOT</shoulder-platform.version><!-- shoulder-platform-version -->
  27. <shoulder-sms-aliyun.version>1.0-SNAPSHOT</shoulder-sms-aliyun.version><!-- shoulder-sms-aliyun.version -->
  28. <!-- =============== 第三方依赖版本 =============== -->
  29. <!-- alibaba 2.2.3 -> cloud hoxton.SR8 -> boot 2.3.3.RELEASE -->
  30. <spring-boot-maven-plugin.version>3.2.4</spring-boot-maven-plugin.version><!-- spring-boot.version -->
  31. <!--spring-cloud-alibaba-dependencies https://sca.aliyun.com/ -->
  32. <spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
  33. <nacos.client.version>2.3.2</nacos.client.version>
  34. <!--spring-cloud-alibaba引入了 fastJson,而低版本的 fastJson 太多安全漏洞,故这里统一设置为高版本 todo 2.0.49 fastjson2 -->
  35. <fastjson.version>1.2.83_noneautotype</fastjson.version>
  36. <fastjson2.version>2.0.50</fastjson2.version>
  37. <minio.version>8.5.10</minio.version>
  38. <!--监控 https://docs.spring-boot-admin.com/current/ -->
  39. <spring-boot-admin-starter-client.version>3.2.3</spring-boot-admin-starter-client.version>
  40. <micrometer-registry-prometheus.version>1.13.0</micrometer-registry-prometheus.version>
  41. <!-- =============== 插件版本 =============== -->
  42. <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
  43. <dockerfile-maven-plugin.version>1.4.13</dockerfile-maven-plugin.version>
  44. <docker.image.prefix>shoulder</docker.image.prefix>
  45. <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
  46. <maven-source-plugin.version>3.3.1</maven-source-plugin.version>
  47. <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
  48. <maven-jar-plugin.version>3.4.1</maven-jar-plugin.version>
  49. <maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
  50. <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
  51. <findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version>
  52. <!-- 更新于2015-->
  53. <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
  54. <versions-maven-plugin.version>2.16.2</versions-maven-plugin.version>
  55. <license-maven-plugin.version>4.5.0</license-maven-plugin.version>
  56. <git-commit-id-plugin.version>6.0.0</git-commit-id-plugin.version>
  57. <sonar-maven-plugin.version>3.10.0.2594</sonar-maven-plugin.version>
  58. <shoulder-maven-plugin.version>1.2.1</shoulder-maven-plugin.version>
  59. <shoulder-framework.errcode-prefix>0x0000</shoulder-framework.errcode-prefix>
  60. <!-- <springdoc-openapi-maven-plugin.version>0.3</springdoc-openapi-maven-plugin.version>-->
  61. </properties>
  62. <developers>
  63. <developer>
  64. <name>lym</name>
  65. <email>cn_lym@foxmail.com</email>
  66. </developer>
  67. </developers>
  68. <licenses>
  69. <license>
  70. <name>Apache 2</name>
  71. <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
  72. <distribution>repo</distribution>
  73. <comments>A business-friendly OSS license</comments>
  74. </license>
  75. </licenses>
  76. <dependencyManagement>
  77. <dependencies>
  78. <dependency>
  79. <groupId>com.alibaba.cloud</groupId>
  80. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  81. <version>${spring-cloud-alibaba.version}</version>
  82. <type>pom</type>
  83. <scope>import</scope>
  84. </dependency>
  85. <dependency>
  86. <groupId>cn.itlym</groupId>
  87. <artifactId>shoulder-parent</artifactId>
  88. <version>${shoulder.version}</version>
  89. <type>pom</type>
  90. <scope>import</scope>
  91. </dependency>
  92. <!-- 平台提供的选型 -->
  93. <dependency>
  94. <groupId>cn.itlym.platform</groupId>
  95. <artifactId>shoulder-platform-starter-config-client</artifactId>
  96. <version>${shoulder-platform.version}</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>cn.itlym.platform</groupId>
  100. <artifactId>shoulder-platform-starter-db</artifactId>
  101. <version>${shoulder-platform.version}</version>
  102. </dependency>
  103. <dependency>
  104. <groupId>cn.itlym.platform</groupId>
  105. <artifactId>shoulder-platform-starter-discovery-client</artifactId>
  106. <version>${shoulder-platform.version}</version>
  107. </dependency>
  108. <dependency>
  109. <groupId>cn.itlym.platform</groupId>
  110. <artifactId>shoulder-platform-starter-job</artifactId>
  111. <version>${shoulder-platform.version}</version>
  112. </dependency>
  113. <dependency>
  114. <groupId>cn.itlym.platform</groupId>
  115. <artifactId>shoulder-platform-starter-rpc-client</artifactId>
  116. <version>${shoulder-platform.version}</version>
  117. </dependency>
  118. <dependency>
  119. <groupId>cn.itlym.platform</groupId>
  120. <artifactId>shoulder-platform-starter-rpc-server</artifactId>
  121. <version>${shoulder-platform.version}</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>cn.itlym.platform</groupId>
  125. <artifactId>shoulder-platform-starter-monitor</artifactId>
  126. <version>${shoulder-platform.version}</version>
  127. </dependency>
  128. <dependency>
  129. <groupId>cn.itlym.platform</groupId>
  130. <artifactId>shoulder-platform-starter-mq</artifactId>
  131. <version>${shoulder-platform.version}</version>
  132. </dependency>
  133. <dependency>
  134. <groupId>cn.itlym.platform</groupId>
  135. <artifactId>shoulder-platform-starter-trace</artifactId>
  136. <version>${shoulder-platform.version}</version>
  137. </dependency>
  138. <dependency>
  139. <groupId>cn.itlym.platform</groupId>
  140. <artifactId>shoulder-platform-starter-micro</artifactId>
  141. <version>${shoulder-platform.version}</version>
  142. </dependency>
  143. <dependency>
  144. <groupId>cn.itlym.platform</groupId>
  145. <artifactId>shoulder-sms-aliyun-spring-boot-starter</artifactId>
  146. <version>${shoulder-sms-aliyun.version}</version>
  147. </dependency>
  148. <!-- ============================================= -->
  149. <!-- 升级阿里巴巴中间件包间接引入的低版本 FastJson 等,使用更安全的版本,强烈建议代码不要用 FastJson -->
  150. <dependency>
  151. <groupId>com.alibaba</groupId>
  152. <artifactId>fastjson</artifactId>
  153. <version>${fastjson.version}</version>
  154. </dependency>
  155. <!-- https://mvnrepository.com/artifact/com.alibaba.fastjson2/fastjson2 -->
  156. <dependency>
  157. <groupId>com.alibaba.fastjson2</groupId>
  158. <artifactId>fastjson2</artifactId>
  159. <version>${fastjson.version}</version>
  160. </dependency>
  161. <dependency>
  162. <groupId>com.alibaba.nacos</groupId>
  163. <artifactId>nacos-client</artifactId>
  164. <version>${nacos.client.version}</version>
  165. </dependency>
  166. <dependency>
  167. <groupId>de.codecentric</groupId>
  168. <artifactId>spring-boot-admin-starter-client</artifactId>
  169. <version>${spring-boot-admin-starter-client.version}</version>
  170. </dependency>
  171. <dependency>
  172. <groupId>io.micrometer</groupId>
  173. <artifactId>micrometer-registry-prometheus</artifactId>
  174. <version>${micrometer-registry-prometheus.version}</version>
  175. </dependency>
  176. <dependency>
  177. <groupId>io.minio</groupId>
  178. <artifactId>minio</artifactId>
  179. <version>${minio.version}</version>
  180. </dependency>
  181. <!-- log-trace begin -->
  182. <!--<dependency>
  183. <groupId>io.zipkin.brave</groupId>
  184. <artifactId>brave</artifactId>
  185. <scope>provided</scope>
  186. </dependency>
  187. <dependency>
  188. <groupId>io.zipkin.brave</groupId>
  189. <artifactId>brave-instrumentation-http</artifactId>
  190. <scope>provided</scope>
  191. </dependency>
  192. <dependency>
  193. <groupId>io.zipkin.brave</groupId>
  194. <artifactId>brave-instrumentation-servlet</artifactId>
  195. <version>${brave.version}</version>
  196. <scope>provided</scope>
  197. </dependency>
  198. <dependency>
  199. <groupId>io.zipkin.brave</groupId>
  200. <artifactId>brave-context-slf4j</artifactId>
  201. <version>${brave.version}</version>
  202. </dependency>-->
  203. <!-- log-trace end -->
  204. </dependencies>
  205. </dependencyManagement>
  206. <profiles>
  207. <!-- 开发环境 -->
  208. <profile>
  209. <id>dev</id>
  210. <properties>
  211. <profile.active>dev</profile.active>
  212. </properties>
  213. <activation>
  214. <activeByDefault>true</activeByDefault>
  215. </activation>
  216. </profile>
  217. <!-- 测试环境-->
  218. <profile>
  219. <id>test</id>
  220. <properties>
  221. <profile.active>test</profile.active>
  222. </properties>
  223. </profile>
  224. <!-- 生产环境-->
  225. <profile>
  226. <id>prod</id>
  227. <properties>
  228. <profile.active>prod</profile.active>
  229. </properties>
  230. </profile>
  231. </profiles>
  232. <build>
  233. <!-- maven 默认使用 artifactId+version拼接 -->
  234. <!--<finalName>${project.artifactId}</finalName>-->
  235. <!-- 动态打包环境配置源文件 -->
  236. <!--<filters>
  237. <filter>../../dynamicConfig/config-${profile.active}.properties</filter>
  238. </filters>-->
  239. <!--<resources>
  240. <resource>
  241. <directory>src/main/resources</directory>
  242. <includes>
  243. <include>**/*</include>
  244. </includes>
  245. <filtering>true</filtering>
  246. </resource>
  247. </resources>-->
  248. <pluginManagement>
  249. <plugins>
  250. <!-- resources资源插件 -->
  251. <plugin>
  252. <groupId>org.apache.maven.plugins</groupId>
  253. <artifactId>maven-resources-plugin</artifactId>
  254. <version>${maven-resources-plugin.version}</version>
  255. <configuration>
  256. <!-- 将默认的 '${*}' 和 '@' 改为 '@' -->
  257. <useDefaultDelimiters>false</useDefaultDelimiters>
  258. <delimiters>
  259. <delimiter>@</delimiter>
  260. </delimiters>
  261. <!-- 统一项目文件字符集编码-资源文件 -->
  262. <encoding>${project.build.sourceEncoding}</encoding>
  263. <!-- 打包时忽略证书文件 -->
  264. <nonFilteredFileExtensions>
  265. <nonFilteredFileExtension>pem</nonFilteredFileExtension>
  266. <nonFilteredFileExtension>pfx</nonFilteredFileExtension>
  267. <nonFilteredFileExtension>p12</nonFilteredFileExtension>
  268. <nonFilteredFileExtension>key</nonFilteredFileExtension>
  269. </nonFilteredFileExtensions>
  270. </configuration>
  271. </plugin>
  272. <!-- Spring Boot maven 打包插件 -->
  273. <plugin>
  274. <groupId>org.springframework.boot</groupId>
  275. <artifactId>spring-boot-maven-plugin</artifactId>
  276. <version>${spring-boot-maven-plugin.version}</version>
  277. <executions>
  278. <execution>
  279. <goals>
  280. <goal>repackage</goal>
  281. </goals>
  282. </execution>
  283. </executions>
  284. </plugin>
  285. <!-- docker打包插件 -->
  286. <plugin>
  287. <groupId>com.spotify</groupId>
  288. <artifactId>dockerfile-maven-plugin</artifactId>
  289. <version>${dockerfile-maven-plugin.version}</version>
  290. <configuration>
  291. <repository>${docker.image.prefix}/${project.artifactId}</repository>
  292. <tag>${shoulder-platform.version}</tag>
  293. <buildArgs>
  294. <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
  295. </buildArgs>
  296. </configuration>
  297. </plugin>
  298. <!-- war 方式打包插件 -->
  299. <!--<plugin>
  300. <groupId>org.apache.maven.plugins</groupId>
  301. <artifactId>maven-war-plugin</artifactId>
  302. <version>${maven-war-plugin}</version>2.1.1
  303. <configuration>
  304. &lt;!&ndash; 设置 war 名称 和编码方式 &ndash;&gt;
  305. <warName>${project.artifactId}</warName>
  306. <encoding>${project.build.sourceEncoding}</encoding>
  307. </configuration>
  308. </plugin>-->
  309. </plugins>
  310. </pluginManagement>
  311. </build>
  312. </project>