pom.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595
  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. <parent>
  7. <groupId>com.yihu.ehr</groupId>
  8. <artifactId>ehr-cloud</artifactId>
  9. <version>1.13.0</version>
  10. </parent>
  11. <artifactId>ehr-ms-parent</artifactId>
  12. <packaging>pom</packaging>
  13. <description>EHR micro service parent pom</description>
  14. <build>
  15. <pluginManagement>
  16. <plugins>
  17. <plugin>
  18. <groupId>org.jooq</groupId>
  19. <artifactId>jooq-codegen-maven</artifactId>
  20. <version>${jooq.version}</version>
  21. </plugin>
  22. <plugin>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-maven-plugin</artifactId>
  25. <version>${spring-boot.version}</version>
  26. </plugin>
  27. <plugin>
  28. <groupId>org.apache.maven.plugins</groupId>
  29. <artifactId>maven-antrun-plugin</artifactId>
  30. <version>1.7</version>
  31. </plugin>
  32. <plugin>
  33. <groupId>org.apache.maven.plugins</groupId>
  34. <artifactId>maven-assembly-plugin</artifactId>
  35. <version>2.5.1</version>
  36. <configuration>
  37. <recompressZippedFiles>false</recompressZippedFiles>
  38. </configuration>
  39. </plugin>
  40. <plugin>
  41. <groupId>org.apache.maven.plugins</groupId>
  42. <artifactId>maven-clean-plugin</artifactId>
  43. <version>2.5</version>
  44. </plugin>
  45. <plugin>
  46. <groupId>org.apache.maven.plugins</groupId>
  47. <artifactId>maven-deploy-plugin</artifactId>
  48. <version>2.8.2</version>
  49. </plugin>
  50. <plugin>
  51. <groupId>org.apache.maven.plugins</groupId>
  52. <artifactId>maven-dependency-plugin</artifactId>
  53. <version>2.10</version>
  54. </plugin>
  55. <plugin>
  56. <groupId>org.apache.maven.plugins</groupId>
  57. <artifactId>maven-eclipse-plugin</artifactId>
  58. <version>2.9</version>
  59. </plugin>
  60. <plugin>
  61. <groupId>org.apache.maven.plugins</groupId>
  62. <artifactId>maven-failsafe-plugin</artifactId>
  63. <version>2.18</version>
  64. </plugin>
  65. <plugin>
  66. <groupId>org.apache.maven.plugins</groupId>
  67. <artifactId>maven-install-plugin</artifactId>
  68. <version>2.5.2</version>
  69. </plugin>
  70. <plugin>
  71. <groupId>org.apache.maven.plugins</groupId>
  72. <artifactId>maven-help-plugin</artifactId>
  73. <version>2.2</version>
  74. </plugin>
  75. <plugin>
  76. <groupId>org.apache.maven.plugins</groupId>
  77. <artifactId>maven-jar-plugin</artifactId>
  78. <version>2.5</version>
  79. </plugin>
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-javadoc-plugin</artifactId>
  83. <version>2.10.1</version>
  84. </plugin>
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-resources-plugin</artifactId>
  88. <version>2.7</version>
  89. </plugin>
  90. <plugin>
  91. <groupId>org.apache.maven.plugins</groupId>
  92. <artifactId>maven-shade-plugin</artifactId>
  93. <version>2.3</version>
  94. </plugin>
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-site-plugin</artifactId>
  98. <version>3.3</version>
  99. <dependencies>
  100. <dependency>
  101. <groupId>org.apache.maven.doxia</groupId>
  102. <artifactId>doxia-module-markdown</artifactId>
  103. <version>1.5</version>
  104. </dependency>
  105. </dependencies>
  106. </plugin>
  107. <plugin>
  108. <groupId>org.apache.maven.plugins</groupId>
  109. <artifactId>maven-source-plugin</artifactId>
  110. <version>2.4</version>
  111. </plugin>
  112. <plugin>
  113. <groupId>org.apache.maven.plugins</groupId>
  114. <artifactId>maven-surefire-plugin</artifactId>
  115. <version>2.18.1</version>
  116. </plugin>
  117. <plugin>
  118. <groupId>org.apache.maven.plugins</groupId>
  119. <artifactId>maven-war-plugin</artifactId>
  120. <version>2.5</version>
  121. </plugin>
  122. <plugin>
  123. <groupId>org.codehaus.mojo</groupId>
  124. <artifactId>build-helper-maven-plugin</artifactId>
  125. <version>1.9.1</version>
  126. </plugin>
  127. <plugin>
  128. <groupId>org.codehaus.mojo</groupId>
  129. <artifactId>exec-maven-plugin</artifactId>
  130. <version>1.3.2</version>
  131. </plugin>
  132. <plugin>
  133. <groupId>org.codehaus.mojo</groupId>
  134. <artifactId>versions-maven-plugin</artifactId>
  135. <version>2.2</version>
  136. </plugin>
  137. <plugin>
  138. <groupId>pl.project13.maven</groupId>
  139. <artifactId>git-commit-id-plugin</artifactId>
  140. <version>2.1.11</version>
  141. </plugin>
  142. </plugins>
  143. </pluginManagement>
  144. <plugins>
  145. <plugin>
  146. <groupId>org.springframework.boot</groupId>
  147. <artifactId>spring-boot-maven-plugin</artifactId>
  148. <version>${version.spring-boot}</version>
  149. <executions>
  150. <execution>
  151. <goals>
  152. <goal>repackage</goal>
  153. </goals>
  154. </execution>
  155. </executions>
  156. </plugin>
  157. <plugin>
  158. <groupId>org.apache.maven.plugins</groupId>
  159. <artifactId>maven-checkstyle-plugin</artifactId>
  160. <version>2.17</version>
  161. <executions>
  162. <execution>
  163. <id>checkstyle-validation</id>
  164. <phase>validate</phase>
  165. <configuration>
  166. <skip>true</skip>
  167. <configLocation>src/checkstyle/checkstyle.xml</configLocation>
  168. <suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
  169. <headerLocation>src/checkstyle/checkstyle-header.txt</headerLocation>
  170. <propertyExpansion>checkstyle.build.directory=${project.build.directory}</propertyExpansion>
  171. <encoding>UTF-8</encoding>
  172. <consoleOutput>true</consoleOutput>
  173. <failsOnError>true</failsOnError>
  174. <includeTestSourceDirectory>true</includeTestSourceDirectory>
  175. </configuration>
  176. <goals>
  177. <goal>check</goal>
  178. </goals>
  179. </execution>
  180. </executions>
  181. </plugin>
  182. <plugin>
  183. <groupId>org.apache.maven.plugins</groupId>
  184. <artifactId>maven-compiler-plugin</artifactId>
  185. <version>3.1</version>
  186. <configuration>
  187. <source>${version.java}</source>
  188. <target>${version.java}</target>
  189. </configuration>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.apache.maven.plugins</groupId>
  193. <artifactId>maven-enforcer-plugin</artifactId>
  194. <version>1.4</version>
  195. <executions>
  196. <execution>
  197. <id>enforce-rules</id>
  198. <goals>
  199. <goal>enforce</goal>
  200. </goals>
  201. <configuration>
  202. <rules>
  203. <requireJavaVersion>
  204. <version>[1.8,)</version>
  205. </requireJavaVersion>
  206. <!--<requireProperty>
  207. <property>main.basedir</property>
  208. </requireProperty>-->
  209. <!--<requireProperty>
  210. <property>project.organization.name</property>
  211. </requireProperty>-->
  212. <!--<requireProperty>
  213. <property>project.name</property>
  214. </requireProperty>-->
  215. <!--<requireProperty>
  216. <property>project.description</property>
  217. </requireProperty>-->
  218. </rules>
  219. <fail>true</fail>
  220. </configuration>
  221. </execution>
  222. </executions>
  223. </plugin>
  224. <plugin>
  225. <groupId>org.apache.maven.plugins</groupId>
  226. <artifactId>maven-jar-plugin</artifactId>
  227. <configuration>
  228. <archive>
  229. <manifest>
  230. <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
  231. <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
  232. </manifest>
  233. </archive>
  234. </configuration>
  235. </plugin>
  236. <plugin>
  237. <groupId>org.apache.maven.plugins</groupId>
  238. <artifactId>maven-surefire-plugin</artifactId>
  239. <configuration>
  240. <includes>
  241. <include>**/*Tests.java</include>
  242. </includes>
  243. <excludes>
  244. <exclude>**/Abstract*.java</exclude>
  245. </excludes>
  246. <!--<systemPropertyVariables>-->
  247. <!--<java.security.egd>file:/dev/./urandom</java.security.egd>-->
  248. <!--<java.awt.headless>true</java.awt.headless>-->
  249. <!--</systemPropertyVariables>-->
  250. <argLine>-Xmx1024m</argLine>
  251. </configuration>
  252. </plugin>
  253. <plugin>
  254. <groupId>org.apache.maven.plugins</groupId>
  255. <artifactId>maven-war-plugin</artifactId>
  256. <configuration>
  257. <failOnMissingWebXml>false</failOnMissingWebXml>
  258. </configuration>
  259. </plugin>
  260. <plugin>
  261. <groupId>org.apache.maven.plugins</groupId>
  262. <artifactId>maven-source-plugin</artifactId>
  263. <executions>
  264. <execution>
  265. <id>attach-sources</id>
  266. <goals>
  267. <goal>jar-no-fork</goal>
  268. </goals>
  269. </execution>
  270. </executions>
  271. </plugin>
  272. <!--<plugin>
  273. <groupId>org.codehaus.mojo</groupId>
  274. <artifactId>animal-sniffer-maven-plugin</artifactId>
  275. <configuration>
  276. <skip>${disable.checks}</skip>
  277. <signature>
  278. <groupId>org.codehaus.mojo.signature</groupId>
  279. <artifactId>java16</artifactId>
  280. <version>1.0</version>
  281. </signature>
  282. <annotations>
  283. <annotation>org.springframework.lang.UsesJava8</annotation>
  284. <annotation>org.springframework.lang.UsesJava7</annotation>
  285. <annotation>org.springframework.boot.lang.UsesUnsafeJava</annotation>
  286. </annotations>
  287. </configuration>
  288. <executions>
  289. <execution>
  290. <id>enforce-java-6</id>
  291. <phase>test</phase>
  292. <goals>
  293. <goal>check</goal>
  294. </goals>
  295. </execution>
  296. </executions>
  297. </plugin>-->
  298. </plugins>
  299. </build>
  300. <dependencyManagement>
  301. <dependencies>
  302. <dependency>
  303. <groupId>com.yihu.ehr</groupId>
  304. <artifactId>commons-admin-gateway-model</artifactId>
  305. <version>${version.ehr}</version>
  306. </dependency>
  307. <dependency>
  308. <groupId>com.yihu.ehr</groupId>
  309. <artifactId>commons-data-elasticsearch</artifactId>
  310. <version>${version.ehr}</version>
  311. </dependency>
  312. <dependency>
  313. <groupId>com.yihu.ehr</groupId>
  314. <artifactId>commons-data-fastdfs</artifactId>
  315. <version>${version.ehr}</version>
  316. </dependency>
  317. <dependency>
  318. <groupId>com.yihu.ehr</groupId>
  319. <artifactId>commons-data-hbase</artifactId>
  320. <version>${version.ehr}</version>
  321. </dependency>
  322. <dependency>
  323. <groupId>com.yihu.ehr</groupId>
  324. <artifactId>commons-data-mysql</artifactId>
  325. <version>${version.ehr}</version>
  326. </dependency>
  327. <dependency>
  328. <groupId>com.yihu.ehr</groupId>
  329. <artifactId>commons-data-query</artifactId>
  330. <version>${version.ehr}</version>
  331. </dependency>
  332. <dependency>
  333. <groupId>com.yihu.ehr</groupId>
  334. <artifactId>commons-data-redis</artifactId>
  335. <version>${version.ehr}</version>
  336. </dependency>
  337. <dependency>
  338. <groupId>com.yihu.ehr</groupId>
  339. <artifactId>commons-data-solr</artifactId>
  340. <version>${version.ehr}</version>
  341. </dependency>
  342. <dependency>
  343. <groupId>com.yihu.ehr</groupId>
  344. <artifactId>commons-ehr-constants</artifactId>
  345. <version>${version.ehr}</version>
  346. </dependency>
  347. <dependency>
  348. <groupId>com.yihu.ehr</groupId>
  349. <artifactId>commons-entity</artifactId>
  350. <version>${version.ehr}</version>
  351. </dependency>
  352. <dependency>
  353. <groupId>com.yihu.ehr</groupId>
  354. <artifactId>commons-profile-core</artifactId>
  355. <version>${version.ehr}</version>
  356. </dependency>
  357. <dependency>
  358. <groupId>com.yihu.ehr</groupId>
  359. <artifactId>commons-redis-mq</artifactId>
  360. <version>${version.ehr}</version>
  361. </dependency>
  362. <dependency>
  363. <groupId>com.yihu.ehr</groupId>
  364. <artifactId>commons-rest-model</artifactId>
  365. <version>${version.ehr}</version>
  366. </dependency>
  367. <dependency>
  368. <groupId>com.yihu.hos</groupId>
  369. <artifactId>common-rest-model</artifactId>
  370. <version>${version.eip}</version>
  371. </dependency>
  372. <dependency>
  373. <groupId>com.yihu.ehr</groupId>
  374. <artifactId>commons-ui-swagger</artifactId>
  375. <version>${version.ehr}</version>
  376. </dependency>
  377. <dependency>
  378. <groupId>com.yihu.ehr</groupId>
  379. <artifactId>commons-util</artifactId>
  380. <version>${version.ehr}</version>
  381. </dependency>
  382. <dependency>
  383. <groupId>com.yihu.ehr</groupId>
  384. <artifactId>commons-web</artifactId>
  385. <version>${version.ehr}</version>
  386. </dependency>
  387. </dependencies>
  388. </dependencyManagement>
  389. <!--
  390. profiles分为三种场景(dev,test,prod),三种部署模式(jar,war,docker).预计是9种模式,
  391. 但目前仅使用到dev,test,prod的jar,test的war.若有需要可以组合配置这些部署模式.
  392. - dev的可执行jar包,在本机调试,不需要配置wagon参数。
  393. - test,prod的可执行jar包,需要在编译后传送到服务器上部署,故需配置wagon参数,参数可根据服务需要自行配置。
  394. - dev,test,prod的war包,编译后使用tomcat api部署,故需配置tomcat参数,参数可根据服务需要自行配置。
  395. -->
  396. <profiles>
  397. <profile>
  398. <id>dev-jar</id>
  399. <activation>
  400. <activeByDefault>true</activeByDefault>
  401. </activation>
  402. <properties>
  403. <skipTests>true</skipTests>
  404. <packaging.type>jar</packaging.type>
  405. <dependency.scope>compile</dependency.scope>
  406. </properties>
  407. <dependencies>
  408. <dependency>
  409. <groupId>org.springframework.boot</groupId>
  410. <artifactId>spring-boot-starter-web</artifactId>
  411. </dependency>
  412. <dependency>
  413. <groupId>org.springframework.boot</groupId>
  414. <artifactId>spring-boot-starter-tomcat</artifactId>
  415. </dependency>
  416. <!--<dependency>
  417. <groupId>org.springframework.boot</groupId>
  418. <artifactId>spring-boot-devtools</artifactId>
  419. <scope>${dependency.scope}</scope>
  420. </dependency>-->
  421. </dependencies>
  422. </profile>
  423. <profile>
  424. <id>test-jar</id>
  425. <properties>
  426. <skipTests>true</skipTests>
  427. <packaging.type>jar</packaging.type>
  428. <dependency.scope>compile</dependency.scope>
  429. <wagonServerId/>
  430. <wagonUrl/>
  431. </properties>
  432. <build>
  433. <plugins>
  434. <plugin>
  435. <groupId>org.codehaus.mojo</groupId>
  436. <artifactId>wagon-maven-plugin</artifactId>
  437. <version>1.0</version>
  438. <configuration>
  439. <serverId>${wagonServerId}</serverId>
  440. <fromFile>${project.build.directory}/${project.build.finalName}.jar</fromFile>
  441. <url>${wagonUrl}</url>
  442. <commands>
  443. <command>pkill -f ${project.build.finalName}.jar</command>
  444. <command>nohub java -Djava.security.egd=file:/dev/./urandom -jar
  445. ${project.build.finalName}.jar &amp;
  446. </command>
  447. </commands>
  448. <displayCommandOutputs>true</displayCommandOutputs>
  449. </configuration>
  450. </plugin>
  451. </plugins>
  452. </build>
  453. <dependencies>
  454. <dependency>
  455. <groupId>org.springframework.boot</groupId>
  456. <artifactId>spring-boot-starter-web</artifactId>
  457. <exclusions>
  458. <exclusion>
  459. <groupId>org.springframework.boot</groupId>
  460. <artifactId>spring-boot-starter-logging</artifactId>
  461. </exclusion>
  462. </exclusions>
  463. </dependency>
  464. <dependency>
  465. <groupId>org.springframework.boot</groupId>
  466. <artifactId>spring-boot-devtools</artifactId>
  467. <scope>${dependency.scope}</scope>
  468. </dependency>
  469. </dependencies>
  470. </profile>
  471. <profile>
  472. <id>test-war</id>
  473. <activation>
  474. <property>
  475. <name>spring.profiles.active</name>
  476. <value>default,test</value>
  477. </property>
  478. </activation>
  479. <properties>
  480. <skipTests>true</skipTests>
  481. <packaging.type>war</packaging.type>
  482. <dependency.scope>provided</dependency.scope>
  483. </properties>
  484. <dependencies>
  485. <dependency>
  486. <groupId>org.springframework.boot</groupId>
  487. <artifactId>spring-boot-starter-web</artifactId>
  488. <scope>${dependency.scope}</scope>
  489. <exclusions>
  490. <exclusion>
  491. <groupId>org.springframework.boot</groupId>
  492. <artifactId>spring-boot-starter-logging</artifactId>
  493. </exclusion>
  494. </exclusions>
  495. </dependency>
  496. <dependency>
  497. <groupId>org.springframework.boot</groupId>
  498. <artifactId>spring-boot-starter-tomcat</artifactId>
  499. <scope>${dependency.scope}</scope>
  500. </dependency>
  501. <dependency>
  502. <groupId>org.springframework.boot</groupId>
  503. <artifactId>spring-boot-devtools</artifactId>
  504. <scope>${dependency.scope}</scope>
  505. </dependency>
  506. </dependencies>
  507. <build>
  508. <plugins>
  509. <plugin>
  510. <groupId>org.apache.tomcat.maven</groupId>
  511. <artifactId>tomcat7-maven-plugin</artifactId>
  512. <version>2.2</version>
  513. <configuration>
  514. <url>http://localhost:8080/manager/text</url>
  515. <server>tomcat8</server>
  516. <username>deployer</username>
  517. <password>jkzldeployer</password>
  518. <path>/${project.artifactId}</path>
  519. <update>true</update>
  520. </configuration>
  521. </plugin>
  522. </plugins>
  523. </build>
  524. </profile>
  525. <profile>
  526. <id>prod-jar</id>
  527. <activation>
  528. <property>
  529. <name>spring.profiles.active</name>
  530. <value>default,prod</value>
  531. </property>
  532. </activation>
  533. <properties>
  534. <skipTests>true</skipTests>
  535. <packaging.type>war</packaging.type>
  536. <dependency.scope>compile</dependency.scope>
  537. <wagonServerId>11.1.2.21</wagonServerId>
  538. <wagonUrl>scp://user:password@11.1.2.21/home/root/ehr-release</wagonUrl>
  539. </properties>
  540. <dependencies>
  541. <dependency>
  542. <groupId>org.springframework.boot</groupId>
  543. <artifactId>spring-boot-starter-web</artifactId>
  544. <scope>${dependency.scope}</scope>
  545. <exclusions>
  546. <exclusion>
  547. <groupId>org.springframework.boot</groupId>
  548. <artifactId>spring-boot-starter-logging</artifactId>
  549. </exclusion>
  550. </exclusions>
  551. </dependency>
  552. </dependencies>
  553. </profile>
  554. <profile>
  555. <id>prod-war</id>
  556. <properties>
  557. <skipTests>true</skipTests>
  558. <packaging.type>war</packaging.type>
  559. <dependency.scope>provided</dependency.scope>
  560. </properties>
  561. <dependencies>
  562. <dependency>
  563. <groupId>org.springframework.boot</groupId>
  564. <artifactId>spring-boot-starter-web</artifactId>
  565. <scope>${dependency.scope}</scope>
  566. <exclusions>
  567. <exclusion>
  568. <groupId>org.springframework.boot</groupId>
  569. <artifactId>spring-boot-starter-logging</artifactId>
  570. </exclusion>
  571. </exclusions>
  572. </dependency>
  573. <dependency>
  574. <groupId>org.springframework.boot</groupId>
  575. <artifactId>spring-boot-starter-tomcat</artifactId>
  576. <scope>${dependency.scope}</scope>
  577. </dependency>
  578. <dependency>
  579. <groupId>org.springframework.boot</groupId>
  580. <artifactId>spring-boot-devtools</artifactId>
  581. <scope>${dependency.scope}</scope>
  582. </dependency>
  583. </dependencies>
  584. <build>
  585. <plugins>
  586. </plugins>
  587. </build>
  588. </profile>
  589. </profiles>
  590. </project>