pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373
  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 作为项目的父parent 的pom,保持当前一个产品线的基础spring boot版本一致 -->
  7. <parent>
  8. <groupId>org.springframework.boot</groupId>
  9. <artifactId>spring-boot-starter-parent</artifactId>
  10. <version>2.7.16</version>
  11. </parent>
  12. <!--
  13. groupId命名: com.公司.项目[.模块]
  14. artifactId: 项目或是项目模块
  15. -->
  16. <groupId>com.ywt</groupId>
  17. <artifactId>ywt-parent</artifactId>
  18. <name>ywt-parent</name>
  19. <description>医务通-父POM</description>
  20. <packaging>pom</packaging>
  21. <version>1.0.0-SNAPSHOT</version>
  22. <!-- 公共属性,所有用到的jar包版本,全部定义在properties当中 -->
  23. <properties>
  24. <commons-collections.version>4.4</commons-collections.version>
  25. <commons-text.version>1.8</commons-text.version>
  26. <druid.version>1.2.20</druid.version>
  27. <fastjson.version>2.0.53</fastjson.version>
  28. <java.version>1.8</java.version>
  29. <jetcache.version>2.5.16</jetcache.version>
  30. <jpos.version>2.1.3</jpos.version>
  31. <nacos.client.version>2.4.3</nacos.client.version>
  32. <pagehelper.version>5.1.11</pagehelper.version>
  33. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  34. <spring-cloud.version>2021.0.8</spring-cloud.version>
  35. <spring-cloud-alibaba.version>2021.0.5.0</spring-cloud-alibaba.version>
  36. <spring-boot.version>2.7.16</spring-boot.version>
  37. <io.springfox>3.0.0</io.springfox>
  38. <javax.servlet-api.version>4.0.1</javax.servlet-api.version>
  39. <mockito-core.version>2.28.2</mockito-core.version>
  40. <mysql.5.version>5.1.48</mysql.5.version>
  41. <os-maven-plugin.version>1.6.2</os-maven-plugin.version>
  42. <grpc.version>1.51.0</grpc.version>
  43. <protobuf.version>3.25.5</protobuf.version>
  44. <dubbo.version>3.3.2</dubbo.version>
  45. <lombok.version>1.18.26</lombok.version>
  46. <redisson.version>3.24.2</redisson.version>
  47. <hutool.version>5.8.22</hutool.version>
  48. <spring-kafka>2.9.13</spring-kafka>
  49. <commons-csv.version>1.6</commons-csv.version>
  50. <mybatis-spring.version>2.0.7</mybatis-spring.version>
  51. <xxl-job.version>2.4.0</xxl-job.version>
  52. <mybatis-plus.version>3.5.9</mybatis-plus.version>
  53. <rocketmq-spring-boot-starter>2.3.1</rocketmq-spring-boot-starter>
  54. </properties>
  55. <repositories>
  56. <repository>
  57. <id>nexus</id>
  58. <name>Team Nexus Repository</name>
  59. <url>http://nexus.ywtinfo.com/repository/maven-public/</url>
  60. </repository>
  61. </repositories>
  62. <pluginRepositories>
  63. <pluginRepository>
  64. <id>nexus</id>
  65. <name>Team Nexus Repository</name>
  66. <url>http://nexus.ywtinfo.com/repository/maven-public/</url>
  67. </pluginRepository>
  68. </pluginRepositories>
  69. <!-- 只是定义,子模块 -->
  70. <dependencyManagement>
  71. <dependencies>
  72. <dependency>
  73. <groupId>org.springframework.boot</groupId>
  74. <artifactId>spring-boot-starter</artifactId>
  75. <version>${spring-boot.version}</version>
  76. <!--剔除的依赖包都在dependencyManagement中定义,不在依赖配置中定义-->
  77. <!--剔除logback的日志使用,使用log4j2..-->
  78. <exclusions>
  79. <exclusion>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-starter-logging</artifactId>
  82. </exclusion>
  83. </exclusions>
  84. </dependency>
  85. <!-- 不使用 tomcat作为默认容器,可使用jetty作为容器-->
  86. <dependency>
  87. <groupId>org.springframework.boot</groupId>
  88. <artifactId>spring-boot-starter-web</artifactId>
  89. <version>${spring-boot.version}</version>
  90. <exclusions>
  91. <exclusion>
  92. <groupId>org.springframework.boot</groupId>
  93. <artifactId>spring-boot-starter-tomcat</artifactId>
  94. </exclusion>
  95. </exclusions>
  96. </dependency>
  97. <!-- 统一定义dubbo 的版本-->
  98. <dependency>
  99. <groupId>org.apache.dubbo</groupId>
  100. <artifactId>dubbo-bom</artifactId>
  101. <version>${dubbo.version}</version>
  102. <type>pom</type>
  103. <scope>import</scope>
  104. </dependency>
  105. <!-- 统一定义io-grpc 的版本-->
  106. <dependency>
  107. <groupId>io.grpc</groupId>
  108. <artifactId>grpc-bom</artifactId>
  109. <version>${grpc.version}</version>
  110. <type>pom</type>
  111. <scope>import</scope>
  112. </dependency>
  113. <!-- 统一定义hutool的版本-->
  114. <dependency>
  115. <groupId>cn.hutool</groupId>
  116. <artifactId>hutool-bom</artifactId>
  117. <version>${hutool.version}</version>
  118. <type>pom</type>
  119. <scope>import</scope>
  120. </dependency>
  121. <dependency>
  122. <groupId>com.baomidou</groupId>
  123. <artifactId>mybatis-plus-bom</artifactId>
  124. <version>${mybatis-plus.version}</version>
  125. <type>pom</type>
  126. <scope>import</scope>
  127. </dependency>
  128. <!-- web 容器使用 undertow 性能更强 -->
  129. <dependency>
  130. <groupId>org.springframework.boot</groupId>
  131. <artifactId>spring-boot-starter-undertow</artifactId>
  132. <version>${spring-boot.version}</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.redisson</groupId>
  136. <artifactId>redisson</artifactId>
  137. <version>${redisson.version}</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>org.springframework.boot</groupId>
  141. <artifactId>spring-boot-starter-actuator</artifactId>
  142. <version>${spring-boot.version}</version>
  143. </dependency>
  144. <dependency>
  145. <groupId>com.alibaba.nacos</groupId>
  146. <artifactId>nacos-client</artifactId>
  147. <version>${nacos.client.version}</version>
  148. </dependency>
  149. <!-- swagger api -->
  150. <dependency>
  151. <groupId>io.springfox</groupId>
  152. <artifactId>springfox-boot-starter</artifactId>
  153. <version>${io.springfox}</version>
  154. </dependency>
  155. <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
  156. <dependency>
  157. <groupId>io.springfox</groupId>
  158. <artifactId>springfox-swagger-ui</artifactId>
  159. <version>3.0.0</version>
  160. </dependency>
  161. <!-- mysql jdbc -->
  162. <dependency>
  163. <groupId>mysql</groupId>
  164. <artifactId>mysql-connector-java</artifactId>
  165. <version>${mysql.5.version}</version>
  166. </dependency>
  167. <dependency>
  168. <groupId>com.alibaba</groupId>
  169. <artifactId>fastjson</artifactId>
  170. <version>${fastjson.version}</version>
  171. </dependency>
  172. <dependency>
  173. <groupId>com.alibaba</groupId>
  174. <artifactId>druid-spring-boot-starter</artifactId>
  175. <version>${druid.version}</version>
  176. </dependency>
  177. <dependency>
  178. <groupId>org.apache.commons</groupId>
  179. <artifactId>commons-collections4</artifactId>
  180. <version>${commons-collections.version}</version>
  181. </dependency>
  182. <!-- spring cloud的jar包版本依赖管理 -->
  183. <dependency>
  184. <groupId>org.springframework.cloud</groupId>
  185. <artifactId>spring-cloud-dependencies</artifactId>
  186. <version>${spring-cloud.version}</version>
  187. <type>pom</type>
  188. <scope>import</scope>
  189. </dependency>
  190. <dependency>
  191. <groupId>com.alibaba.cloud</groupId>
  192. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  193. <version>${spring-cloud-alibaba.version}</version>
  194. <scope>import</scope>
  195. <type>pom</type>
  196. </dependency>
  197. <dependency>
  198. <groupId>org.apache.commons</groupId>
  199. <artifactId>commons-text</artifactId>
  200. <version>${commons-text.version}</version>
  201. </dependency>
  202. <dependency>
  203. <groupId>com.alibaba</groupId>
  204. <artifactId>druid</artifactId>
  205. <version>${druid.version}</version>
  206. </dependency>
  207. <dependency>
  208. <groupId>org.mockito</groupId>
  209. <artifactId>mockito-core</artifactId>
  210. <version>${mockito-core.version}</version>
  211. </dependency>
  212. <dependency>
  213. <groupId>org.springframework.boot</groupId>
  214. <artifactId>spring-boot-starter-test</artifactId>
  215. <version>${spring-boot.version}</version>
  216. <exclusions>
  217. <exclusion>
  218. <groupId>org.mockito</groupId>
  219. <artifactId>mockito-core</artifactId>
  220. </exclusion>
  221. </exclusions>
  222. </dependency>
  223. <dependency>
  224. <groupId>com.google.protobuf</groupId>
  225. <artifactId>protobuf-bom</artifactId>
  226. <version>${protobuf.version}</version>
  227. <scope>import</scope>
  228. <type>pom</type>
  229. </dependency>
  230. <dependency>
  231. <groupId>org.projectlombok</groupId>
  232. <artifactId>lombok</artifactId>
  233. <version>${lombok.version}</version>
  234. </dependency>
  235. <dependency>
  236. <groupId>org.springframework.kafka</groupId>
  237. <artifactId>spring-kafka</artifactId>
  238. <version>${spring-kafka}</version>
  239. </dependency>
  240. <dependency>
  241. <groupId>javax.servlet</groupId>
  242. <artifactId>javax.servlet-api</artifactId>
  243. <version>${javax.servlet-api.version}</version>
  244. </dependency>
  245. <dependency>
  246. <groupId>org.apache.commons</groupId>
  247. <artifactId>commons-csv</artifactId>
  248. <version>${commons-csv.version}</version>
  249. </dependency>
  250. <!-- xxl-job-core -->
  251. <dependency>
  252. <groupId>com.xuxueli</groupId>
  253. <artifactId>xxl-job-core</artifactId>
  254. <version>${xxl-job.version}</version>
  255. </dependency>
  256. <dependency>
  257. <groupId>org.apache.rocketmq</groupId>
  258. <artifactId>rocketmq-spring-boot-starter</artifactId>
  259. <version>${rocketmq-spring-boot-starter}</version>
  260. </dependency>
  261. </dependencies>
  262. </dependencyManagement>
  263. <build>
  264. <plugins>
  265. <plugin>
  266. <!-- 代码编译指定jdk版本 -->
  267. <groupId>org.apache.maven.plugins</groupId>
  268. <artifactId>maven-compiler-plugin</artifactId>
  269. <configuration>
  270. <source>${java.version}</source>
  271. <target>${java.version}</target>
  272. </configuration>
  273. </plugin>
  274. <plugin>
  275. <!-- 打包编译跳过测试类执行 -->
  276. <groupId>org.apache.maven.plugins</groupId>
  277. <artifactId>maven-surefire-plugin</artifactId>
  278. <configuration>
  279. <skipTests>true</skipTests>
  280. </configuration>
  281. </plugin>
  282. <plugin>
  283. <!-- 生成maven打包编译时的时间字段,这里为build.time字段 -->
  284. <groupId>org.codehaus.mojo</groupId>
  285. <artifactId>build-helper-maven-plugin</artifactId>
  286. <version>3.0.0</version>
  287. <executions>
  288. <execution>
  289. <id>timestamp-property</id>
  290. <goals>
  291. <goal>timestamp-property</goal>
  292. </goals>
  293. <configuration>
  294. <name>build.time</name>
  295. <pattern>yyyy-MM-dd'T'HH:mm</pattern>
  296. <timeZone>GMT+8</timeZone>
  297. <locale>zh_CN</locale>
  298. </configuration>
  299. </execution>
  300. </executions>
  301. </plugin>
  302. <plugin>
  303. <groupId>org.springframework.boot</groupId>
  304. <artifactId>spring-boot-maven-plugin</artifactId>
  305. <executions>
  306. <!-- spring boot的maven包,不执行repackage的打包命令,不打包成fat可执行jar,如果需要fat可执行jar,在对应的子模块pom中重新定义覆盖父类的定义 -->
  307. <execution>
  308. <id>repackage</id>
  309. <goals>
  310. <goal>repackage</goal>
  311. </goals>
  312. <configuration>
  313. <skip>true</skip>
  314. </configuration>
  315. </execution>
  316. <!-- 在包的META-INFO目录下面生成编译的build-info.properties文件,作为包的编译信息描述,此信息可通过actuator/info接口查看 -->
  317. <execution>
  318. <id>build-info</id>
  319. <goals>
  320. <goal>build-info</goal>
  321. </goals>
  322. <configuration>
  323. <additionalProperties>
  324. <encoding>${project.build.sourceEncoding}</encoding>
  325. <time>${build.time}</time>
  326. </additionalProperties>
  327. </configuration>
  328. </execution>
  329. </executions>
  330. </plugin>
  331. <plugin>
  332. <groupId>org.apache.maven.plugins</groupId>
  333. <artifactId>maven-deploy-plugin</artifactId>
  334. <version>3.0.0-M1</version>
  335. </plugin>
  336. </plugins>
  337. </build>
  338. <!-- 工程的deploy地址,不要每个子模块都定义 -->
  339. <distributionManagement>
  340. <snapshotRepository>
  341. <id>snapshots</id>
  342. <name>Nexus Snapshot Repository</name>
  343. <url>http://nexus.ywtinfo.com/repository/maven-snapshots/</url>
  344. </snapshotRepository>
  345. <repository>
  346. <id>nexus</id>
  347. <name>Team Nexus Repository</name>
  348. <url>http://nexus.ywtinfo.com/repository/maven-public/</url>
  349. </repository>
  350. </distributionManagement>
  351. </project>