You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pom.xml 2.7 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <artifactId>demo-docker</artifactId>
  6. <version>1.0.0-SNAPSHOT</version>
  7. <packaging>jar</packaging>
  8. <name>demo-docker</name>
  9. <description>Demo project for Spring Boot</description>
  10. <parent>
  11. <groupId>com.xkcoding</groupId>
  12. <artifactId>spring-boot-demo</artifactId>
  13. <version>1.0.0-SNAPSHOT</version>
  14. </parent>
  15. <properties>
  16. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  17. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  18. <java.version>1.8</java.version>
  19. <dockerfile-version>1.4.9</dockerfile-version>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-web</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-test</artifactId>
  29. <scope>test</scope>
  30. </dependency>
  31. </dependencies>
  32. <build>
  33. <finalName>demo-docker</finalName>
  34. <plugins>
  35. <plugin>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-maven-plugin</artifactId>
  38. </plugin>
  39. <plugin>
  40. <groupId>com.spotify</groupId>
  41. <artifactId>dockerfile-maven-plugin</artifactId>
  42. <version>${dockerfile-version}</version>
  43. <configuration>
  44. <repository>${project.build.finalName}</repository>
  45. <tag>${project.version}</tag>
  46. <buildArgs>
  47. <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
  48. </buildArgs>
  49. </configuration>
  50. <!-- <executions>-->
  51. <!-- &lt;!&ndash;设置运行 mvn package 的时候自动执行docker build&ndash;&gt;-->
  52. <!-- <execution>-->
  53. <!-- <id>default</id>-->
  54. <!-- <phase>package</phase>-->
  55. <!-- <goals>-->
  56. <!-- <goal>build</goal>-->
  57. <!-- </goals>-->
  58. <!-- </execution>-->
  59. <!-- </executions>-->
  60. </plugin>
  61. </plugins>
  62. </build>
  63. </project>