pom.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. <groupId>com.neo</groupId>
  6. <artifactId>spring-boot-docker</artifactId>
  7. <version>1.0</version>
  8. <packaging>jar</packaging>
  9. <name>spring-boot-docker</name>
  10. <description>Demo project for Spring Boot</description>
  11. <parent>
  12. <groupId>org.springframework.boot</groupId>
  13. <artifactId>spring-boot-starter-parent</artifactId>
  14. <version>2.0.0.RELEASE</version>
  15. </parent>
  16. <properties>
  17. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  18. <java.version>1.8</java.version>
  19. <docker.image.prefix>springboot</docker.image.prefix>
  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. <plugins>
  34. <plugin>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-maven-plugin</artifactId>
  37. </plugin>
  38. <!-- Docker maven plugin -->
  39. <plugin>
  40. <groupId>com.spotify</groupId>
  41. <artifactId>docker-maven-plugin</artifactId>
  42. <version>1.0.0</version>
  43. <configuration>
  44. <imageName>${docker.image.prefix}/${project.artifactId}</imageName>
  45. <dockerDirectory>src/main/docker</dockerDirectory>
  46. <resources>
  47. <resource>
  48. <targetPath>/</targetPath>
  49. <directory>${project.build.directory}</directory>
  50. <include>${project.build.finalName}.jar</include>
  51. </resource>
  52. </resources>
  53. </configuration>
  54. </plugin>
  55. <!-- Docker maven plugin -->
  56. </plugins>
  57. </build>
  58. </project>