pom.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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>admin-service</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>admin-service</name>
  11. <description>Admin 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. <!-- 配置-->
  19. <dependency>
  20. <groupId>org.springframework.cloud</groupId>
  21. <artifactId>spring-cloud-starter-config</artifactId>
  22. </dependency>
  23. <dependency>
  24. <groupId>org.springframework.cloud</groupId>
  25. <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.boot</groupId>
  29. <artifactId>spring-boot-starter-actuator</artifactId>
  30. </dependency>
  31. <!--hystrix-dashboard-->
  32. <dependency>
  33. <groupId>org.springframework.cloud</groupId>
  34. <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
  35. </dependency>
  36. <!--hystrix -->
  37. <dependency>
  38. <groupId>org.springframework.cloud</groupId>
  39. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  40. </dependency>
  41. <!--spring cloud admin server-->
  42. <dependency>
  43. <groupId>de.codecentric</groupId>
  44. <artifactId>spring-boot-admin-starter-server</artifactId>
  45. <version>2.2.0</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>net.logstash.logback</groupId>
  49. <artifactId>logstash-logback-encoder</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.springframework.boot</groupId>
  53. <artifactId>spring-boot-starter-web</artifactId>
  54. <exclusions>
  55. <exclusion>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-tomcat</artifactId>
  58. </exclusion>
  59. </exclusions>
  60. </dependency>
  61. <dependency>
  62. <groupId>org.springframework.boot</groupId>
  63. <artifactId>spring-boot-starter-undertow</artifactId>
  64. </dependency>
  65. <dependency>
  66. <groupId>org.springframework.boot</groupId>
  67. <artifactId>spring-boot-starter-security</artifactId>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.jolokia</groupId>
  71. <artifactId>jolokia-core</artifactId>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.springframework.cloud</groupId>
  75. <artifactId>spring-cloud-starter-bus-amqp</artifactId>
  76. </dependency>
  77. </dependencies>
  78. <build>
  79. <plugins>
  80. <plugin>
  81. <groupId>org.springframework.boot</groupId>
  82. <artifactId>spring-boot-maven-plugin</artifactId>
  83. </plugin>
  84. <!-- 添加docker-maven插件 -->
  85. <plugin>
  86. <groupId>com.spotify</groupId>
  87. <artifactId>docker-maven-plugin</artifactId>
  88. <configuration>
  89. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  90. <forceTags>true</forceTags>
  91. <!--镜像的FROM,使用压缩的小镜像-->
  92. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  93. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  94. <resources>
  95. <resource>
  96. <targetPath>/</targetPath>
  97. <directory>${project.build.directory}</directory>
  98. <include>${project.build.finalName}.jar</include>
  99. </resource>
  100. </resources>
  101. <serverId>docker-registry</serverId>
  102. <registryUrl>${registryUrl}</registryUrl>
  103. </configuration>
  104. </plugin>
  105. </plugins>
  106. </build>
  107. </project>