pom.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  2. <modelVersion>4.0.0</modelVersion>
  3. <groupId>info.aspirecn.iov.sjjh</groupId>
  4. <artifactId>iov-sjjh-servicenode-fed</artifactId>
  5. <version>1.2.9</version>
  6. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>2.2.2.RELEASE</version>
  10. <relativePath/> <!-- lookup parent from repository -->
  11. </parent>
  12. <dependencies>
  13. <dependency>
  14. <groupId>org.springframework.boot</groupId>
  15. <artifactId>spring-boot-starter-web</artifactId>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.springframework.cloud</groupId>
  19. <artifactId>spring-cloud-starter-zuul</artifactId>
  20. <version>1.4.5.RELEASE</version>
  21. </dependency>
  22. <dependency>
  23. <groupId>org.projectlombok</groupId>
  24. <artifactId>lombok</artifactId>
  25. <version>1.16.22</version>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.cloud</groupId>
  29. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  30. </dependency>
  31. </dependencies>
  32. <dependencyManagement>
  33. <dependencies>
  34. <dependency>
  35. <groupId>org.springframework.cloud</groupId>
  36. <artifactId>spring-cloud-dependencies</artifactId>
  37. <version>Hoxton.RELEASE</version>
  38. <type>pom</type>
  39. <scope>import</scope>
  40. </dependency>
  41. </dependencies>
  42. </dependencyManagement>
  43. <build>
  44. <plugins>
  45. <plugin>
  46. <groupId>org.springframework.boot</groupId>
  47. <artifactId>spring-boot-maven-plugin</artifactId>
  48. </plugin>
  49. <plugin>
  50. <groupId>org.apache.maven.plugins</groupId>
  51. <artifactId>maven-dependency-plugin</artifactId>
  52. <executions>
  53. <execution>
  54. <id>copy-dependencies</id>
  55. <phase>prepare-package</phase>
  56. <goals>
  57. <goal>copy-dependencies</goal>
  58. </goals>
  59. <configuration>
  60. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  61. <excludeGroupIds>
  62. info.aspirecn.iov.sjjh
  63. </excludeGroupIds>
  64. </configuration>
  65. </execution>
  66. <execution>
  67. <id>copy</id>
  68. <phase>install</phase>
  69. <goals>
  70. <goal>copy-dependencies</goal>
  71. </goals>
  72. <configuration>
  73. <outputDirectory>
  74. ${project.build.directory}/lib
  75. </outputDirectory>
  76. <excludeGroupIds>
  77. info.aspirecn.iov.sjjh
  78. </excludeGroupIds>
  79. </configuration>
  80. </execution>
  81. </executions>
  82. </plugin>
  83. <plugin>
  84. <groupId>org.apache.maven.plugins</groupId>
  85. <artifactId>maven-resources-plugin</artifactId>
  86. <configuration>
  87. <nonFilteredFileExtensions>
  88. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  89. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  90. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  91. </nonFilteredFileExtensions>
  92. </configuration>
  93. <executions>
  94. <execution>
  95. <id>default-resources</id>
  96. <phase>validate</phase>
  97. <goals>
  98. <goal>copy-resources</goal>
  99. </goals>
  100. <configuration>
  101. <outputDirectory>target/classes</outputDirectory>
  102. <useDefaultDelimiters>false</useDefaultDelimiters>
  103. <delimiters>
  104. <delimiter>@</delimiter>
  105. </delimiters>
  106. <resources>
  107. <resource>
  108. <directory>src/main/resources/config</directory>
  109. <targetPath>config</targetPath>
  110. <filtering>true</filtering>
  111. <includes>
  112. <include>**</include>
  113. </includes>
  114. </resource>
  115. <resource>
  116. <directory>src/main/resources/docker</directory>
  117. <targetPath>docker</targetPath>
  118. <filtering>true</filtering>
  119. <includes>
  120. <include>**</include>
  121. </includes>
  122. </resource>
  123. <resource>
  124. <directory>src/main/resources/static</directory>
  125. <targetPath>static</targetPath>
  126. <filtering>true</filtering>
  127. <includes>
  128. <include>**</include>
  129. </includes>
  130. </resource>
  131. </resources>
  132. </configuration>
  133. </execution>
  134. </executions>
  135. </plugin>
  136. <plugin>
  137. <groupId>com.spotify</groupId>
  138. <artifactId>docker-maven-plugin</artifactId>
  139. <version>1.2.0</version>
  140. <configuration>
  141. <!-- 设置Docker 镜像名称 -->
  142. <imageName>hub.i139.cn/iov-sjjh/${project.artifactId}:${project.version}</imageName>
  143. <!-- 设置Dockerfile存放目录地址 -->
  144. <dockerDirectory>${project.basedir}/src/main/resources/docker</dockerDirectory>
  145. <resources>
  146. <resource>
  147. <targetPath>/</targetPath>
  148. <directory>${project.build.directory}</directory>
  149. <include>${project.build.finalName}.jar</include>
  150. </resource>
  151. </resources>
  152. <!-- 设置和setting.xml中的servers对应的server,里面存放了docker hub仓库的用户名、密码 -->
  153. <serverId>docker-hub</serverId>
  154. <!-- 设置docker hub仓库地址 -->
  155. <registryUrl>https://hub.i139.cn</registryUrl>
  156. <!-- 设置docker remote API地址 -->
  157. <!--<dockerHost>http://docker-in-docker.rdc-plugin:2375</dockerHost>-->
  158. </configuration>
  159. </plugin>
  160. </plugins>
  161. </build>
  162. </project>