pom.xml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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>common</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>common</name>
  11. <description>Common 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. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>com.alibaba</groupId>
  22. <artifactId>fastjson</artifactId>
  23. <version>1.2.49</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.apache.commons</groupId>
  27. <artifactId>commons-lang3</artifactId>
  28. <version>3.7</version>
  29. </dependency>
  30. </dependencies>
  31. <build>
  32. <plugins>
  33. <plugin>
  34. <groupId>org.springframework.boot</groupId>
  35. <artifactId>spring-boot-maven-plugin</artifactId>
  36. </plugin>
  37. <!-- 添加docker-maven插件 -->
  38. <plugin>
  39. <groupId>com.spotify</groupId>
  40. <artifactId>docker-maven-plugin</artifactId>
  41. <version>1.1.1</version>
  42. <configuration>
  43. <imageName>192.168.2.236:5000/diagbotcloud/${project.artifactId}:${project.version}</imageName>
  44. <pushImage>true</pushImage>
  45. <!--<forceTags>true</forceTags>-->
  46. <!--镜像的FROM,使用java官方镜像-->
  47. <baseImage>frolvlad/alpine-oraclejdk8:slim</baseImage>
  48. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  49. <resources>
  50. <resource>
  51. <targetPath>/</targetPath>
  52. <directory>${project.build.directory}</directory>
  53. <include>${project.build.finalName}.jar</include>
  54. </resource>
  55. </resources>
  56. <serverId>docker-registry</serverId>
  57. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  58. </configuration>
  59. </plugin>
  60. </plugins>
  61. </build>
  62. </project>