pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  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>1.2.62</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.0</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. <!-- web 容器使用 undertow 性能更强 -->
  122. <dependency>
  123. <groupId>org.springframework.boot</groupId>
  124. <artifactId>spring-boot-starter-undertow</artifactId>
  125. <version>${spring-boot.version}</version>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.redisson</groupId>
  129. <artifactId>redisson</artifactId>
  130. <version>${redisson.version}</version>
  131. </dependency>
  132. <dependency>
  133. <groupId>org.springframework.boot</groupId>
  134. <artifactId>spring-boot-starter-actuator</artifactId>
  135. <version>${spring-boot.version}</version>
  136. </dependency>
  137. <dependency>
  138. <groupId>com.alibaba.nacos</groupId>
  139. <artifactId>nacos-client</artifactId>
  140. <version>${nacos.client.version}</version>
  141. </dependency>
  142. <!-- swagger api -->
  143. <dependency>
  144. <groupId>io.springfox</groupId>
  145. <artifactId>springfox-boot-starter</artifactId>
  146. <version>${io.springfox}</version>
  147. </dependency>
  148. <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger-ui -->
  149. <dependency>
  150. <groupId>io.springfox</groupId>
  151. <artifactId>springfox-swagger-ui</artifactId>
  152. <version>3.0.0</version>
  153. </dependency>
  154. <!-- mysql jdbc -->
  155. <dependency>
  156. <groupId>mysql</groupId>
  157. <artifactId>mysql-connector-java</artifactId>
  158. <version>${mysql.5.version}</version>
  159. </dependency>
  160. <dependency>
  161. <groupId>com.alibaba</groupId>
  162. <artifactId>fastjson</artifactId>
  163. <version>${fastjson.version}</version>
  164. </dependency>
  165. <dependency>
  166. <groupId>com.alibaba</groupId>
  167. <artifactId>druid-spring-boot-starter</artifactId>
  168. <version>${druid.version}</version>
  169. </dependency>
  170. <dependency>
  171. <groupId>org.apache.commons</groupId>
  172. <artifactId>commons-collections4</artifactId>
  173. <version>${commons-collections.version}</version>
  174. </dependency>
  175. <!-- spring cloud的jar包版本依赖管理 -->
  176. <dependency>
  177. <groupId>org.springframework.cloud</groupId>
  178. <artifactId>spring-cloud-dependencies</artifactId>
  179. <version>${spring-cloud.version}</version>
  180. <type>pom</type>
  181. <scope>import</scope>
  182. </dependency>
  183. <dependency>
  184. <groupId>com.alibaba.cloud</groupId>
  185. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  186. <version>${spring-cloud-alibaba.version}</version>
  187. <scope>import</scope>
  188. <type>pom</type>
  189. </dependency>
  190. <dependency>
  191. <groupId>org.apache.commons</groupId>
  192. <artifactId>commons-text</artifactId>
  193. <version>${commons-text.version}</version>
  194. </dependency>
  195. <dependency>
  196. <groupId>com.alibaba</groupId>
  197. <artifactId>druid</artifactId>
  198. <version>${druid.version}</version>
  199. </dependency>
  200. <dependency>
  201. <groupId>org.mockito</groupId>
  202. <artifactId>mockito-core</artifactId>
  203. <version>${mockito-core.version}</version>
  204. </dependency>
  205. <dependency>
  206. <groupId>org.springframework.boot</groupId>
  207. <artifactId>spring-boot-starter-test</artifactId>
  208. <version>${spring-boot.version}</version>
  209. <exclusions>
  210. <exclusion>
  211. <groupId>org.mockito</groupId>
  212. <artifactId>mockito-core</artifactId>
  213. </exclusion>
  214. </exclusions>
  215. </dependency>
  216. <dependency>
  217. <groupId>com.google.protobuf</groupId>
  218. <artifactId>protobuf-bom</artifactId>
  219. <version>${protobuf.version}</version>
  220. <scope>import</scope>
  221. <type>pom</type>
  222. </dependency>
  223. <dependency>
  224. <groupId>org.projectlombok</groupId>
  225. <artifactId>lombok</artifactId>
  226. <version>${lombok.version}</version>
  227. </dependency>
  228. <dependency>
  229. <groupId>org.springframework.kafka</groupId>
  230. <artifactId>spring-kafka</artifactId>
  231. <version>${spring-kafka}</version>
  232. </dependency>
  233. <dependency>
  234. <groupId>javax.servlet</groupId>
  235. <artifactId>javax.servlet-api</artifactId>
  236. <version>${javax.servlet-api.version}</version>
  237. </dependency>
  238. <dependency>
  239. <groupId>org.apache.commons</groupId>
  240. <artifactId>commons-csv</artifactId>
  241. <version>${commons-csv.version}</version>
  242. </dependency>
  243. <!-- xxl-job-core -->
  244. <dependency>
  245. <groupId>com.xuxueli</groupId>
  246. <artifactId>xxl-job-core</artifactId>
  247. <version>${xxl-job.version}</version>
  248. </dependency>
  249. <dependency>
  250. <groupId>com.baomidou</groupId>
  251. <artifactId>mybatis-plus-boot-starter</artifactId>
  252. <version>${mybatis-plus.version}</version>
  253. </dependency>
  254. <dependency>
  255. <groupId>com.baomidou</groupId>
  256. <artifactId>mybatis-plus-generator</artifactId>
  257. <version>${mybatis-plus.version}</version>
  258. </dependency>
  259. <dependency>
  260. <groupId>org.apache.rocketmq</groupId>
  261. <artifactId>rocketmq-spring-boot-starter</artifactId>
  262. <version>${rocketmq-spring-boot-starter}</version>
  263. </dependency>
  264. </dependencies>
  265. </dependencyManagement>
  266. <build>
  267. <plugins>
  268. <plugin>
  269. <!-- 代码编译指定jdk版本 -->
  270. <groupId>org.apache.maven.plugins</groupId>
  271. <artifactId>maven-compiler-plugin</artifactId>
  272. <configuration>
  273. <source>${java.version}</source>
  274. <target>${java.version}</target>
  275. </configuration>
  276. </plugin>
  277. <plugin>
  278. <!-- 打包编译跳过测试类执行 -->
  279. <groupId>org.apache.maven.plugins</groupId>
  280. <artifactId>maven-surefire-plugin</artifactId>
  281. <configuration>
  282. <skipTests>true</skipTests>
  283. </configuration>
  284. </plugin>
  285. <plugin>
  286. <!-- 生成maven打包编译时的时间字段,这里为build.time字段 -->
  287. <groupId>org.codehaus.mojo</groupId>
  288. <artifactId>build-helper-maven-plugin</artifactId>
  289. <version>3.0.0</version>
  290. <executions>
  291. <execution>
  292. <id>timestamp-property</id>
  293. <goals>
  294. <goal>timestamp-property</goal>
  295. </goals>
  296. <configuration>
  297. <name>build.time</name>
  298. <pattern>yyyy-MM-dd'T'HH:mm</pattern>
  299. <timeZone>GMT+8</timeZone>
  300. <locale>zh_CN</locale>
  301. </configuration>
  302. </execution>
  303. </executions>
  304. </plugin>
  305. <plugin>
  306. <groupId>org.springframework.boot</groupId>
  307. <artifactId>spring-boot-maven-plugin</artifactId>
  308. <executions>
  309. <!-- spring boot的maven包,不执行repackage的打包命令,不打包成fat可执行jar,如果需要fat可执行jar,在对应的子模块pom中重新定义覆盖父类的定义 -->
  310. <execution>
  311. <id>repackage</id>
  312. <goals>
  313. <goal>repackage</goal>
  314. </goals>
  315. <configuration>
  316. <skip>true</skip>
  317. </configuration>
  318. </execution>
  319. <!-- 在包的META-INFO目录下面生成编译的build-info.properties文件,作为包的编译信息描述,此信息可通过actuator/info接口查看 -->
  320. <execution>
  321. <id>build-info</id>
  322. <goals>
  323. <goal>build-info</goal>
  324. </goals>
  325. <configuration>
  326. <additionalProperties>
  327. <encoding>${project.build.sourceEncoding}</encoding>
  328. <time>${build.time}</time>
  329. </additionalProperties>
  330. </configuration>
  331. </execution>
  332. </executions>
  333. </plugin>
  334. <plugin>
  335. <groupId>org.apache.maven.plugins</groupId>
  336. <artifactId>maven-deploy-plugin</artifactId>
  337. <version>3.0.0-M1</version>
  338. </plugin>
  339. </plugins>
  340. </build>
  341. <!-- 工程的deploy地址,不要每个子模块都定义 -->
  342. <distributionManagement>
  343. <snapshotRepository>
  344. <id>snapshots</id>
  345. <name>Nexus Snapshot Repository</name>
  346. <url>http://nexus.ywtinfo.com/repository/maven-snapshots/</url>
  347. </snapshotRepository>
  348. <repository>
  349. <id>nexus</id>
  350. <name>Team Nexus Repository</name>
  351. <url>http://nexus.ywtinfo.com/repository/maven-public/</url>
  352. </repository>
  353. </distributionManagement>
  354. </project>