pom.xml 15 KB

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