pom.xml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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>monitor-service</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>monitor-service</name>
  11. <description>Monitor 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>org.springframework.cloud</groupId>
  20. <artifactId>spring-cloud-starter-config</artifactId>
  21. </dependency>
  22. <dependency>
  23. <groupId>org.springframework.cloud</groupId>
  24. <artifactId>spring-cloud-starter-netflix-turbine</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-actuator</artifactId>
  29. </dependency>
  30. <!--hystrix-dashboard-->
  31. <dependency>
  32. <groupId>org.springframework.cloud</groupId>
  33. <artifactId>spring-cloud-starter-netflix-hystrix-dashboard</artifactId>
  34. </dependency>
  35. <!--hystrix -->
  36. <dependency>
  37. <groupId>org.springframework.cloud</groupId>
  38. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  39. </dependency>
  40. <dependency>
  41. <groupId>net.logstash.logback</groupId>
  42. <artifactId>logstash-logback-encoder</artifactId>
  43. </dependency>
  44. </dependencies>
  45. <build>
  46. <plugins>
  47. <plugin>
  48. <groupId>org.springframework.boot</groupId>
  49. <artifactId>spring-boot-maven-plugin</artifactId>
  50. </plugin>
  51. <!-- 添加docker-maven插件 -->
  52. <plugin>
  53. <groupId>com.spotify</groupId>
  54. <artifactId>docker-maven-plugin</artifactId>
  55. <configuration>
  56. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  57. <forceTags>true</forceTags>
  58. <!--镜像的FROM,使用java官方镜像-->
  59. <baseImage>java:8u111-jdk</baseImage>
  60. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  61. <resources>
  62. <resource>
  63. <targetPath>/</targetPath>
  64. <directory>${project.build.directory}</directory>
  65. <include>${project.build.finalName}.jar</include>
  66. </resource>
  67. </resources>
  68. <serverId>docker-registry</serverId>
  69. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  70. </configuration>
  71. </plugin>
  72. </plugins>
  73. </build>
  74. </project>