pom.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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. <packaging>pom</packaging>
  6. <modules>
  7. <module>middle-school</module>
  8. <module>adult-college</module>
  9. <module>university</module>
  10. <module>employment-subsidy</module>
  11. <module>training-subsidy</module>
  12. <module>job-subsidy</module>
  13. <module>professional-qualification</module>
  14. <module>talent-intermediary</module>
  15. <module>civil-service-performance</module>
  16. <module>assisted-reproductive-institution</module>
  17. <module>medical-insurance-institution</module>
  18. <module>airport-throughput</module>
  19. <module>car-repair-station</module>
  20. <module>common</module>
  21. </modules>
  22. <parent>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-parent</artifactId>
  25. <version>2.1.4.RELEASE</version>
  26. <relativePath/> <!-- lookup parent from repository -->
  27. </parent>
  28. <groupId>com.dgtis</groupId>
  29. <artifactId>hsdata-app</artifactId>
  30. <version>0.0.1-SNAPSHOT</version>
  31. <name>hsdata-app</name>
  32. <description>衡水市大数据信息平台微应用</description>
  33. <properties>
  34. <java.version>1.8</java.version>
  35. </properties>
  36. <dependencies>
  37. <dependency>
  38. <groupId>com.alibaba</groupId>
  39. <artifactId>druid-spring-boot-starter</artifactId>
  40. <version>1.1.10</version>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.springframework.boot</groupId>
  44. <artifactId>spring-boot-starter-data-jpa</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.springframework.boot</groupId>
  48. <artifactId>spring-boot-starter-data-rest</artifactId>
  49. </dependency>
  50. <dependency>
  51. <groupId>mysql</groupId>
  52. <artifactId>mysql-connector-java</artifactId>
  53. <scope>runtime</scope>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.projectlombok</groupId>
  57. <artifactId>lombok</artifactId>
  58. <optional>true</optional>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-starter-test</artifactId>
  63. <scope>test</scope>
  64. </dependency>
  65. </dependencies>
  66. <build>
  67. <plugins>
  68. <plugin>
  69. <groupId>org.springframework.boot</groupId>
  70. <artifactId>spring-boot-maven-plugin</artifactId>
  71. </plugin>
  72. <!--使用docker-maven-plugin插件-->
  73. <plugin>
  74. <groupId>com.spotify</groupId>
  75. <artifactId>docker-maven-plugin</artifactId>
  76. <version>1.0.0</version>
  77. <!--将插件绑定在某个phase执行-->
  78. <executions>
  79. <execution>
  80. <id>build-image</id>
  81. <!--将插件绑定在package这个phase上。也就是说,用户只需执行mvn package ,就会自动执行mvn docker:build-->
  82. <phase>package</phase>
  83. <goals>
  84. <goal>build</goal>
  85. </goals>
  86. </execution>
  87. </executions>
  88. <configuration>
  89. <!--指定生成的镜像名-->
  90. <imageName>hsdata/${project.artifactId}</imageName>
  91. <!--指定标签-->
  92. <imageTags>
  93. <imageTag>1.0</imageTag>
  94. </imageTags>
  95. <!-- 指定 Dockerfile 路径-->
  96. <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
  97. <!--指定远程 docker api地址-->
  98. <dockerHost>http://39.98.206.39:2375</dockerHost>
  99. <!-- 这里是复制 jar 包到 docker 容器指定目录配置 -->
  100. <resources>
  101. <resource>
  102. <targetPath>/</targetPath>
  103. <!--jar 包所在的路径 此处配置的 即对应 target 目录-->
  104. <directory>${project.build.directory}</directory>
  105. <!-- 需要包含的 jar包 ,这里对应的是 Dockerfile中添加的文件名 -->
  106. <include>${project.build.finalName}.jar</include>
  107. </resource>
  108. </resources>
  109. </configuration>
  110. </plugin>
  111. </plugins>
  112. </build>
  113. </project>