pom.xml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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. <groupId>com.diagbot</groupId>
  7. <artifactId>data-service</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>data-service</name>
  11. <description>Data Service for Spring Boot</description>
  12. <parent>
  13. <groupId>com.diagbot</groupId>
  14. <artifactId>diagbotcloud</artifactId>
  15. <version>0.0.1-SNAPSHOT</version>
  16. </parent>
  17. <dependencies>
  18. <dependency>
  19. <groupId>com.diagbot</groupId>
  20. <artifactId>common</artifactId>
  21. <version>0.0.1-SNAPSHOT</version>
  22. </dependency>
  23. <dependency>
  24. <groupId>com.diagbot</groupId>
  25. <artifactId>common-biz-client</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.cloud</groupId>
  29. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  30. </dependency>
  31. <!-- 配置-->
  32. <dependency>
  33. <groupId>org.springframework.cloud</groupId>
  34. <artifactId>spring-cloud-starter-config</artifactId>
  35. </dependency>
  36. <!-- 开启web-->
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-web</artifactId>
  40. <exclusions>
  41. <exclusion>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-tomcat</artifactId>
  44. </exclusion>
  45. </exclusions>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.springframework.boot</groupId>
  49. <artifactId>spring-boot-starter-undertow</artifactId>
  50. </dependency>
  51. <!-- 开启feign-->
  52. <dependency>
  53. <groupId>org.springframework.cloud</groupId>
  54. <artifactId>spring-cloud-starter-openfeign</artifactId>
  55. </dependency>
  56. <!-- dashboard -->
  57. <!-- actuator-->
  58. <dependency>
  59. <groupId>org.springframework.boot</groupId>
  60. <artifactId>spring-boot-starter-actuator</artifactId>
  61. </dependency>
  62. <!--hystrix-dashboard-->
  63. <dependency>
  64. <groupId>org.springframework.cloud</groupId>
  65. <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
  66. </dependency>
  67. <!--hystrix -->
  68. <dependency>
  69. <groupId>org.springframework.cloud</groupId>
  70. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  71. </dependency>
  72. <!-- zipkin-->
  73. <!--<dependency>-->
  74. <!--<groupId>org.springframework.cloud</groupId>-->
  75. <!--<artifactId>spring-cloud-starter-zipkin</artifactId>-->
  76. <!--</dependency>-->
  77. <!--swagger-->
  78. <dependency>
  79. <groupId>io.springfox</groupId>
  80. <artifactId>springfox-swagger2</artifactId>
  81. </dependency>
  82. <dependency>
  83. <groupId>io.springfox</groupId>
  84. <artifactId>springfox-swagger-ui</artifactId>
  85. </dependency>
  86. <!--security-->
  87. <dependency>
  88. <groupId>org.springframework.cloud</groupId>
  89. <artifactId>spring-cloud-starter-oauth2</artifactId>
  90. </dependency>
  91. <!-- mq -->
  92. <dependency>
  93. <groupId>org.springframework.boot</groupId>
  94. <artifactId>spring-boot-starter-amqp</artifactId>
  95. </dependency>
  96. <dependency>
  97. <groupId>org.projectlombok</groupId>
  98. <artifactId>lombok</artifactId>
  99. <optional>true</optional>
  100. </dependency>
  101. <dependency>
  102. <groupId>net.logstash.logback</groupId>
  103. <artifactId>logstash-logback-encoder</artifactId>
  104. </dependency>
  105. <dependency>
  106. <groupId>org.springframework.cloud</groupId>
  107. <artifactId>spring-cloud-starter-bus-amqp</artifactId>
  108. </dependency>
  109. <dependency>
  110. <groupId>org.springframework.cloud</groupId>
  111. <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
  112. </dependency>
  113. </dependencies>
  114. <build>
  115. <plugins>
  116. <plugin>
  117. <groupId>org.springframework.boot</groupId>
  118. <artifactId>spring-boot-maven-plugin</artifactId>
  119. </plugin>
  120. <!-- 添加docker-maven插件 -->
  121. <plugin>
  122. <groupId>com.spotify</groupId>
  123. <artifactId>docker-maven-plugin</artifactId>
  124. <configuration>
  125. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  126. <forceTags>true</forceTags>
  127. <!--镜像的FROM,使用压缩的小镜像-->
  128. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  129. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  130. <resources>
  131. <resource>
  132. <targetPath>/</targetPath>
  133. <directory>${project.build.directory}</directory>
  134. <include>${project.build.finalName}.jar</include>
  135. </resource>
  136. </resources>
  137. <serverId>docker-registry</serverId>
  138. <registryUrl>${registryUrl}</registryUrl>
  139. </configuration>
  140. </plugin>
  141. </plugins>
  142. </build>
  143. </project>