pom.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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.uas.message</groupId>
  6. <artifactId>message-console</artifactId>
  7. <version>0.0.1-SNAPSHOT</version>
  8. <packaging>war</packaging>
  9. <name>message-console</name>
  10. <description>Uas Message Console for Spring Boot</description>
  11. <parent>
  12. <groupId>org.springframework.boot</groupId>
  13. <artifactId>spring-boot-starter-parent</artifactId>
  14. <version>1.5.6.RELEASE</version>
  15. <relativePath/> <!-- lookup parent from repository -->
  16. </parent>
  17. <properties>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  20. <java.version>1.8</java.version>
  21. <message.version>0.0.1</message.version>
  22. <docker.plugin.version>0.4.13</docker.plugin.version>
  23. <!-- <docker.host>http://10.10.100.200:5555</docker.host> -->
  24. <docker.registry>10.10.100.200:5000</docker.registry>
  25. <docker.directory>${project.build.directory}/generated-docker</docker.directory>
  26. <docker.pushImage>false</docker.pushImage>
  27. </properties>
  28. <dependencies>
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-jdbc</artifactId>
  32. </dependency>
  33. <dependency>
  34. <groupId>org.springframework.boot</groupId>
  35. <artifactId>spring-boot-starter-web</artifactId>
  36. <exclusions>
  37. <exclusion>
  38. <artifactId>org.apache.tomcat.embed</artifactId>
  39. <groupId>tomcat-embed-jasper</groupId>
  40. </exclusion>
  41. <exclusion>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-tomcat</artifactId>
  44. </exclusion>
  45. </exclusions>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.springframework.boot</groupId>
  49. <artifactId>spring-boot-starter-test</artifactId>
  50. <scope>test</scope>
  51. </dependency>
  52. <!-- drivers -->
  53. <dependency>
  54. <groupId>com.oracle</groupId>
  55. <artifactId>ojdbc6</artifactId>
  56. <version>11.2.0</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>mysql</groupId>
  60. <artifactId>mysql-connector-java</artifactId>
  61. </dependency>
  62. <!-- project -->
  63. <dependency>
  64. <groupId>com.uas.message</groupId>
  65. <artifactId>message-mq</artifactId>
  66. <version>${message.version}</version>
  67. </dependency>
  68. <dependency>
  69. <groupId>com.uas.message</groupId>
  70. <artifactId>message-mail</artifactId>
  71. <version>${message.version}</version>
  72. </dependency>
  73. <dependency>
  74. <groupId>com.uas.message</groupId>
  75. <artifactId>message-sms</artifactId>
  76. <version>${message.version}</version>
  77. </dependency>
  78. <!-- jsp support -->
  79. <dependency>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-starter-tomcat</artifactId>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.tomcat.embed</groupId>
  85. <artifactId>tomcat-embed-jasper</artifactId>
  86. </dependency>
  87. <dependency>
  88. <groupId>javax.servlet</groupId>
  89. <artifactId>jstl</artifactId>
  90. <version>1.2</version>
  91. </dependency>
  92. </dependencies>
  93. <build>
  94. <finalName>${project.artifactId}</finalName>
  95. <resources>
  96. <!-- 必须包含这个 -->
  97. <resource>
  98. <directory>${project.basedir}/src/main/resources</directory>
  99. <includes>
  100. <include>**/*</include>
  101. </includes>
  102. </resource>
  103. <!-- 必须包含这个 -->
  104. <resource>
  105. <directory>${project.basedir}/src/main/webapp</directory>
  106. <includes>
  107. <include>**/*</include>
  108. </includes>
  109. </resource>
  110. <!-- 替换Dockerfile占位符 -->
  111. <resource>
  112. <directory>${project.basedir}/src/main/docker</directory>
  113. <filtering>true</filtering>
  114. <includes>
  115. <include>**/Dockerfile</include>
  116. </includes>
  117. <targetPath>${docker.directory}</targetPath>
  118. </resource>
  119. </resources>
  120. <plugins>
  121. <plugin>
  122. <groupId>org.springframework.boot</groupId>
  123. <artifactId>spring-boot-maven-plugin</artifactId>
  124. </plugin>
  125. <plugin>
  126. <groupId>com.spotify</groupId>
  127. <artifactId>docker-maven-plugin</artifactId>
  128. <version>${docker.plugin.version}</version>
  129. <executions>
  130. <execution>
  131. <id>build-image</id>
  132. <phase>package</phase>
  133. <goals>
  134. <goal>build</goal>
  135. </goals>
  136. </execution>
  137. </executions>
  138. <configuration>
  139. <registryUrl>${docker.registry}</registryUrl>
  140. <!-- <dockerHost>${docker.host}</dockerHost>
  141. <baseImage>${docker.registry}/java</baseImage>
  142. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  143. -->
  144. <dockerDirectory>${docker.directory}</dockerDirectory>
  145. <imageName>${docker.registry}/${project.artifactId}</imageName>
  146. <pushImage>${docker.pushImage}</pushImage>
  147. <resources>
  148. <resource>
  149. <targetPath>/</targetPath>
  150. <directory>${project.build.directory}</directory>
  151. <include>${project.build.finalName}.jar</include>
  152. </resource>
  153. </resources>
  154. </configuration>
  155. </plugin>
  156. </plugins>
  157. </build>
  158. </project>