pom.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <parent>
  5. <groupId>com.uas.ps</groupId>
  6. <artifactId>ps-parent</artifactId>
  7. <version>0.0.1-SNAPSHOT</version>
  8. </parent>
  9. <artifactId>ps-message</artifactId>
  10. <packaging>jar</packaging>
  11. <properties>
  12. <docker.plugin.version>0.4.13</docker.plugin.version>
  13. <!-- <docker.host>http://10.10.100.200:5555</docker.host> -->
  14. <docker.registry>10.10.100.200:5000</docker.registry>
  15. <docker.directory>${project.build.directory}/generated-docker</docker.directory>
  16. <docker.pushImage>false</docker.pushImage>
  17. </properties>
  18. <dependencies>
  19. <dependency>
  20. <groupId>junit</groupId>
  21. <artifactId>junit</artifactId>
  22. <scope>test</scope>
  23. </dependency>
  24. <dependency>
  25. <groupId>com.uas.ps</groupId>
  26. <artifactId>ps-core</artifactId>
  27. </dependency>
  28. <!-- spring boot -->
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-actuator</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.springframework.boot</groupId>
  35. <artifactId>spring-boot-starter-web</artifactId>
  36. </dependency>
  37. <dependency>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-security</artifactId>
  40. </dependency>
  41. <!--jpa-->
  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-configuration-processor</artifactId>
  49. </dependency>
  50. <dependency>
  51. <groupId>com.alibaba</groupId>
  52. <artifactId>fastjson</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>com.alibaba</groupId>
  56. <artifactId>druid</artifactId>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.hibernate</groupId>
  60. <artifactId>hibernate-core</artifactId>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.hibernate</groupId>
  64. <artifactId>hibernate-ehcache</artifactId>
  65. </dependency>
  66. <!-- 邮件 -->
  67. <dependency>
  68. <groupId>com.uas.message</groupId>
  69. <artifactId>message-mail-api</artifactId>
  70. <version>0.0.1</version>
  71. </dependency>
  72. <!-- httpClient -->
  73. <dependency>
  74. <groupId>org.apache.httpcomponents</groupId>
  75. <artifactId>httpclient</artifactId>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.apache.httpcomponents</groupId>
  79. <artifactId>httpmime</artifactId>
  80. </dependency>
  81. <!-- 消息-->
  82. <dependency>
  83. <groupId>com.uas.message</groupId>
  84. <artifactId>message-sms-api</artifactId>
  85. <version>0.0.1</version>
  86. </dependency>
  87. <dependency>
  88. <groupId>mysql</groupId>
  89. <artifactId>mysql-connector-java</artifactId>
  90. <scope>runtime</scope>
  91. </dependency>
  92. <dependency>
  93. <groupId>com.uas.account</groupId>
  94. <artifactId>account-common</artifactId>
  95. <version>0.0.1-SNAPSHOT</version>
  96. </dependency>
  97. </dependencies>
  98. <build>
  99. <resources>
  100. <!-- 必须包含这个 -->
  101. <resource>
  102. <directory>${project.basedir}/src/main/resources</directory>
  103. <includes>
  104. <include>**/*</include>
  105. </includes>
  106. </resource>
  107. <!-- 替换Dockerfile占位符 -->
  108. <resource>
  109. <directory>${project.basedir}/src/main/docker</directory>
  110. <filtering>true</filtering>
  111. <includes>
  112. <include>**/Dockerfile</include>
  113. </includes>
  114. <targetPath>${docker.directory}</targetPath>
  115. </resource>
  116. </resources>
  117. <plugins>
  118. <plugin>
  119. <groupId>org.springframework.boot</groupId>
  120. <artifactId>spring-boot-maven-plugin</artifactId>
  121. </plugin>
  122. <plugin>
  123. <groupId>com.spotify</groupId>
  124. <artifactId>docker-maven-plugin</artifactId>
  125. <version>${docker.plugin.version}</version>
  126. <executions>
  127. <execution>
  128. <id>build-image</id>
  129. <phase>package</phase>
  130. <goals>
  131. <goal>build</goal>
  132. </goals>
  133. </execution>
  134. </executions>
  135. <configuration>
  136. <registryUrl>${docker.registry}</registryUrl>
  137. <!-- <dockerHost>${docker.host}</dockerHost>
  138. <baseImage>${docker.registry}/java</baseImage>
  139. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  140. -->
  141. <dockerDirectory>${docker.directory}</dockerDirectory>
  142. <imageName>${docker.registry}/${project.artifactId}</imageName>
  143. <pushImage>${docker.pushImage}</pushImage>
  144. <resources>
  145. <resource>
  146. <targetPath>/</targetPath>
  147. <directory>${project.build.directory}</directory>
  148. <include>${project.build.finalName}.jar</include>
  149. </resource>
  150. </resources>
  151. </configuration>
  152. </plugin>
  153. </plugins>
  154. </build>
  155. </project>