pom.xml 2.8 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. <parent>
  7. <groupId>cn.stylefeng</groupId>
  8. <artifactId>guns-separation</artifactId>
  9. <version>1.1.0</version>
  10. <relativePath>../pom.xml</relativePath>
  11. </parent>
  12. <artifactId>guns-main</artifactId>
  13. <packaging>jar</packaging>
  14. <dependencies>
  15. <dependency>
  16. <groupId>cn.stylefeng</groupId>
  17. <artifactId>guns-system</artifactId>
  18. <version>1.1.0</version>
  19. </dependency>
  20. <dependency>
  21. <groupId>org.springframework.boot</groupId>
  22. <artifactId>spring-boot-starter-test</artifactId>
  23. <scope>test</scope>
  24. </dependency>
  25. </dependencies>
  26. <build>
  27. <finalName>guns-separation</finalName>
  28. <plugins>
  29. <plugin>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-maven-plugin</artifactId>
  32. <executions>
  33. <execution>
  34. <goals>
  35. <goal>repackage</goal>
  36. </goals>
  37. </execution>
  38. </executions>
  39. <configuration>
  40. <!-- 如果没有该项配置,则devtools不会起作用,即应用不会restart -->
  41. <fork>true</fork>
  42. </configuration>
  43. </plugin>
  44. <plugin>
  45. <groupId>io.fabric8</groupId>
  46. <artifactId>docker-maven-plugin</artifactId>
  47. <version>0.26.1</version>
  48. <configuration>
  49. <dockerHost>tcp://demo.stylefeng.cn:2376</dockerHost>
  50. <certPath>_dockerCerts</certPath>
  51. <images>
  52. <image>
  53. <alias>service</alias>
  54. <name>stylefeng/${project.artifactId}-advanced:latest</name>
  55. <build>
  56. <from>java:8</from>
  57. <assembly>
  58. <descriptor>docker-assembly.xml</descriptor>
  59. </assembly>
  60. <cmd>
  61. <shell>java -jar /maven/${project.artifactId}.jar</shell>
  62. </cmd>
  63. </build>
  64. </image>
  65. </images>
  66. </configuration>
  67. </plugin>
  68. </plugins>
  69. </build>
  70. </project>