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>gateway-service</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>gateway-service</name>
  11. <description>Gateway service project 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.boot</groupId>
  20. <artifactId>spring-boot-starter-web</artifactId>
  21. <exclusions>
  22. <exclusion>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-tomcat</artifactId>
  25. </exclusion>
  26. </exclusions>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.boot</groupId>
  30. <artifactId>spring-boot-starter-undertow</artifactId>
  31. </dependency>
  32. <dependency>
  33. <groupId>org.springframework.cloud</groupId>
  34. <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
  35. </dependency>
  36. <!-- 配置-->
  37. <dependency>
  38. <groupId>org.springframework.cloud</groupId>
  39. <artifactId>spring-cloud-starter-config</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.springframework.cloud</groupId>
  43. <artifactId>spring-cloud-starter</artifactId>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.springframework.cloud</groupId>
  47. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  48. </dependency>
  49. <dependency>
  50. <groupId>net.logstash.logback</groupId>
  51. <artifactId>logstash-logback-encoder</artifactId>
  52. </dependency>
  53. <dependency>
  54. <groupId>org.springframework.cloud</groupId>
  55. <artifactId>spring-cloud-starter-bus-amqp</artifactId>
  56. </dependency>
  57. <!--swagger-->
  58. <dependency>
  59. <groupId>io.springfox</groupId>
  60. <artifactId>springfox-swagger2</artifactId>
  61. </dependency>
  62. <dependency>
  63. <groupId>io.springfox</groupId>
  64. <artifactId>springfox-swagger-ui</artifactId>
  65. </dependency>
  66. </dependencies>
  67. <dependencyManagement>
  68. <dependencies>
  69. <dependency>
  70. <groupId>org.springframework.cloud</groupId>
  71. <artifactId>spring-cloud-dependencies</artifactId>
  72. <version>${spring-cloud.version}</version>
  73. <type>pom</type>
  74. <scope>import</scope>
  75. </dependency>
  76. </dependencies>
  77. </dependencyManagement>
  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-oraclejdk8:slim</baseImage>
  93. <entryPoint>["java", "-jar", "/${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>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  103. </configuration>
  104. </plugin>
  105. </plugins>
  106. </build>
  107. </project>