pom.xml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. </dependency>
  31. <dependency>
  32. <groupId>net.logstash.logback</groupId>
  33. <artifactId>logstash-logback-encoder</artifactId>
  34. </dependency>
  35. </dependencies>
  36. <build>
  37. <plugins>
  38. <plugin>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-maven-plugin</artifactId>
  41. </plugin>
  42. <!-- 添加docker-maven插件 -->
  43. <plugin>
  44. <groupId>com.spotify</groupId>
  45. <artifactId>docker-maven-plugin</artifactId>
  46. <configuration>
  47. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  48. <!--<imageTags>-->
  49. <!--<imageTag>${project.version}</imageTag>-->
  50. <!--<imageTag>latest</imageTag>-->
  51. <!--</imageTags>-->
  52. <forceTags>true</forceTags>
  53. <!--镜像的FROM,使用java官方镜像-->
  54. <baseImage>java:8u111-jdk</baseImage>
  55. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  56. <resources>
  57. <resource>
  58. <targetPath>/</targetPath>
  59. <directory>${project.build.directory}</directory>
  60. <include>${project.build.finalName}.jar</include>
  61. </resource>
  62. </resources>
  63. <serverId>docker-registry</serverId>
  64. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  65. </configuration>
  66. </plugin>
  67. </plugins>
  68. </build>
  69. </project>