pom.xml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.diagbot</groupId>
  7. <artifactId>common-biz-client</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>common-biz-client</name>
  11. <description>common biz client project for Spring Boot</description>
  12. <properties>
  13. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  14. <encoding>UTF-8</encoding>
  15. <java.version>1.8</java.version>
  16. <maven.compiler.source>1.8</maven.compiler.source>
  17. <maven.compiler.target>1.8</maven.compiler.target>
  18. <docker.image.prefix>192.168.2.236:5000/diagbotcloud</docker.image.prefix>
  19. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-web</artifactId>
  25. <version>2.2.1.RELEASE</version>
  26. <scope>provided</scope>
  27. </dependency>
  28. <dependency>
  29. <groupId>org.springframework.cloud</groupId>
  30. <artifactId>spring-cloud-starter-openfeign</artifactId>
  31. <version>2.2.0.RELEASE</version>
  32. <scope>provided</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.cloud</groupId>
  36. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  37. <version>2.2.0.RELEASE</version>
  38. <scope>provided</scope>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.projectlombok</groupId>
  42. <artifactId>lombok</artifactId>
  43. <version>1.18.10</version>
  44. <scope>provided</scope>
  45. </dependency>
  46. <dependency>
  47. <groupId>com.diagbot</groupId>
  48. <artifactId>common</artifactId>
  49. <version>0.0.1-SNAPSHOT</version>
  50. <scope>provided</scope>
  51. </dependency>
  52. </dependencies>
  53. <!-- 私有仓库 -->
  54. <repositories>
  55. <repository>
  56. <id>nexus-releases</id>
  57. <name>Nexus Release Repository</name>
  58. <url>http://192.168.2.236:8081/repository/maven-releases/</url>
  59. </repository>
  60. </repositories>
  61. <!-- 私有仓库 -->
  62. <pluginRepositories>
  63. <pluginRepository>
  64. <id>nexus-releases</id>
  65. <name>Nexus Release Repository</name>
  66. <url>http://192.168.2.236:8081/repository/maven-releases/</url>
  67. <releases>
  68. <enabled>true</enabled>
  69. </releases>
  70. <snapshots>
  71. <enabled>true</enabled>
  72. </snapshots>
  73. </pluginRepository>
  74. </pluginRepositories>
  75. <distributionManagement>
  76. <repository>
  77. <id>nexus-releases</id>
  78. <name>Nexus Release Repository</name>
  79. <url>http://192.168.2.236:8081/repository/maven-releases/</url>
  80. </repository>
  81. <snapshotRepository>
  82. <id>nexus-snapshots</id>
  83. <name>Nexus Snapshot Repository</name>
  84. <url>http://192.168.2.236:8081/repository/maven-snapshots/</url>
  85. </snapshotRepository>
  86. </distributionManagement>
  87. <build>
  88. <plugins>
  89. <plugin>
  90. <groupId>org.springframework.boot</groupId>
  91. <artifactId>spring-boot-maven-plugin</artifactId>
  92. </plugin>
  93. <!-- 添加docker-maven插件 -->
  94. <plugin>
  95. <groupId>com.spotify</groupId>
  96. <artifactId>docker-maven-plugin</artifactId>
  97. <version>1.1.1</version>
  98. <configuration>
  99. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  100. <pushImage>true</pushImage>
  101. <!--<forceTags>true</forceTags>-->
  102. <!--镜像的FROM,使用java官方镜像-->
  103. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  104. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8","/${project.build.finalName}.jar"]</entryPoint>
  105. <resources>
  106. <resource>
  107. <targetPath>/</targetPath>
  108. <directory>${project.build.directory}</directory>
  109. <include>${project.build.finalName}.jar</include>
  110. </resource>
  111. </resources>
  112. <serverId>docker-registry</serverId>
  113. <registryUrl>${registryUrl}</registryUrl>
  114. </configuration>
  115. </plugin>
  116. </plugins>
  117. </build>
  118. </project>