pom.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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.0.2</version>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.springframework.boot</groupId>
  49. <artifactId>spring-boot-starter-web</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.springframework.boot</groupId>
  53. <artifactId>spring-boot-starter-security</artifactId>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.jolokia</groupId>
  57. <artifactId>jolokia-core</artifactId>
  58. </dependency>
  59. </dependencies>
  60. <build>
  61. <plugins>
  62. <plugin>
  63. <groupId>org.springframework.boot</groupId>
  64. <artifactId>spring-boot-maven-plugin</artifactId>
  65. </plugin>
  66. <!-- 添加docker-maven插件 -->
  67. <plugin>
  68. <groupId>com.spotify</groupId>
  69. <artifactId>docker-maven-plugin</artifactId>
  70. <configuration>
  71. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  72. <forceTags>true</forceTags>
  73. <!--镜像的FROM,使用java官方镜像-->
  74. <baseImage>java:8u111-jdk</baseImage>
  75. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  76. <resources>
  77. <resource>
  78. <targetPath>/</targetPath>
  79. <directory>${project.build.directory}</directory>
  80. <include>${project.build.finalName}.jar</include>
  81. </resource>
  82. </resources>
  83. <serverId>docker-registry</serverId>
  84. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  85. </configuration>
  86. </plugin>
  87. </plugins>
  88. </build>
  89. </project>