pom.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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>eureka-server</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>eureka-server</name>
  11. <description>Eureka Server 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. <properties>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  20. <java.version>1.8</java.version>
  21. </properties>
  22. <dependencies>
  23. <dependency>
  24. <groupId>org.springframework.cloud</groupId>
  25. <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>org.springframework.boot</groupId>
  29. <artifactId>spring-boot-starter-web</artifactId>
  30. <exclusions>
  31. <exclusion>
  32. <groupId>org.springframework.boot</groupId>
  33. <artifactId>spring-boot-starter-tomcat</artifactId>
  34. </exclusion>
  35. </exclusions>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-undertow</artifactId>
  40. </dependency>
  41. <dependency>
  42. <groupId>net.logstash.logback</groupId>
  43. <artifactId>logstash-logback-encoder</artifactId>
  44. </dependency>
  45. <!--&lt;!&ndash;热部署引用&ndash;&gt;-->
  46. <!--<dependency>-->
  47. <!--<groupId>org.springframework.boot</groupId>-->
  48. <!--<artifactId>spring-boot-devtools</artifactId>-->
  49. <!--<optional>true</optional>-->
  50. <!--</dependency>-->
  51. </dependencies>
  52. <build>
  53. <plugins>
  54. <plugin>
  55. <groupId>org.springframework.boot</groupId>
  56. <artifactId>spring-boot-maven-plugin</artifactId>
  57. </plugin>
  58. <!-- 添加docker-maven插件 -->
  59. <plugin>
  60. <groupId>com.spotify</groupId>
  61. <artifactId>docker-maven-plugin</artifactId>
  62. <configuration>
  63. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  64. <!--<imageTags>-->
  65. <!--<imageTag>${project.version}</imageTag>-->
  66. <!--<imageTag>latest</imageTag>-->
  67. <!--</imageTags>-->
  68. <forceTags>true</forceTags>
  69. <!--镜像的FROM,使用压缩的小镜像-->
  70. <baseImage>frolvlad/alpine-oraclejdk8:slim</baseImage>
  71. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  72. <resources>
  73. <resource>
  74. <targetPath>/</targetPath>
  75. <directory>${project.build.directory}</directory>
  76. <include>${project.build.finalName}.jar</include>
  77. </resource>
  78. </resources>
  79. <serverId>docker-registry</serverId>
  80. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  81. </configuration>
  82. </plugin>
  83. </plugins>
  84. </build>
  85. </project>