pom.xml 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <parent>
  7. <groupId>com.shanghaichengdi</groupId>
  8. <artifactId>download-center</artifactId>
  9. <version>1.0-SNAPSHOT</version>
  10. </parent>
  11. <groupId>com.shanghaichengdi</groupId>
  12. <artifactId>download-center-server</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>downloadPictures</name>
  15. <description>download-center-server</description>
  16. <properties>
  17. <java.version>1.8</java.version>
  18. <fastjson.version>1.2.83</fastjson.version>
  19. </properties>
  20. <dependencies>
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter</artifactId>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-web</artifactId>
  28. </dependency>
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-test</artifactId>
  32. <scope>test</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.projectlombok</groupId>
  36. <artifactId>lombok</artifactId>
  37. </dependency>
  38. <dependency>
  39. <groupId>com.shanghaichengdi</groupId>
  40. <artifactId>download-center-common</artifactId>
  41. <version>1.0-SNAPSHOT</version>
  42. <scope>compile</scope>
  43. </dependency>
  44. <dependency>
  45. <groupId>com.alibaba</groupId>
  46. <artifactId>fastjson</artifactId>
  47. <version>${fastjson.version}</version>
  48. </dependency>
  49. <dependency>
  50. <groupId>com.baomidou</groupId>
  51. <artifactId>mybatis-plus-boot-starter</artifactId>
  52. <version>3.4.1</version>
  53. </dependency>
  54. <dependency>
  55. <groupId>cn.hutool</groupId>
  56. <artifactId>hutool-all</artifactId>
  57. <version>5.5.2</version>
  58. </dependency>
  59. <dependency>
  60. <groupId>com.oracle</groupId>
  61. <artifactId>ojdbc6</artifactId>
  62. <version>11.2.0.3</version>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.apache.httpcomponents</groupId>
  66. <artifactId>httpclient</artifactId>
  67. </dependency>
  68. </dependencies>
  69. <profiles>
  70. <profile>
  71. <!-- 本地开发环境 -->
  72. <id>dev</id>
  73. <properties>
  74. <profiles.active>dev</profiles.active>
  75. </properties>
  76. </profile>
  77. <profile>
  78. <!-- 发布环境 -->
  79. <id>pro-file</id>
  80. <properties>
  81. <profiles.active>pro/fileServer</profiles.active>
  82. </properties>
  83. </profile>
  84. <profile>
  85. <!-- 发布环境 -->
  86. <id>pro-service</id>
  87. <properties>
  88. <profiles.active>pro/serviceServer</profiles.active>
  89. </properties>
  90. <activation>
  91. <!-- 设置默认激活这个配置 -->
  92. <activeByDefault>true</activeByDefault>
  93. </activation>
  94. </profile>
  95. <profile>
  96. <!-- 测试环境 -->
  97. <id>test</id>
  98. <properties>
  99. <profiles.active>test</profiles.active>
  100. </properties>
  101. </profile>
  102. </profiles>
  103. <build>
  104. <finalName>bayonetOffsiteCase</finalName>
  105. <plugins>
  106. <plugin>
  107. <artifactId>maven-war-plugin</artifactId>
  108. <version>3.0.0</version>
  109. </plugin>
  110. <plugin>
  111. <groupId>org.springframework.boot</groupId>
  112. <artifactId>spring-boot-maven-plugin</artifactId>
  113. <version>2.0.3.RELEASE</version>
  114. <configuration>
  115. <mainClass>
  116. com.shanghaichengdi.downloadcenterserver.DownloadCenterServerApplication
  117. </mainClass>
  118. <includeSystemScope>true</includeSystemScope>
  119. </configuration>
  120. <executions>
  121. <execution>
  122. <goals>
  123. <goal>repackage</goal>
  124. </goals>
  125. </execution>
  126. </executions>
  127. </plugin>
  128. <plugin>
  129. <groupId>org.apache.maven.plugins</groupId>
  130. <artifactId>maven-dependency-plugin</artifactId>
  131. <version>2.10</version>
  132. <executions>
  133. <execution>
  134. <id>copy-dependencies</id>
  135. <phase>compile</phase>
  136. <goals>
  137. <goal>copy-dependencies</goal>
  138. </goals>
  139. <configuration>
  140. <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/lib
  141. </outputDirectory>
  142. <includeScope>system</includeScope>
  143. </configuration>
  144. </execution>
  145. </executions>
  146. </plugin>
  147. <plugin>
  148. <groupId>org.jetbrains.kotlin</groupId>
  149. <artifactId>kotlin-maven-plugin</artifactId>
  150. <version>${kotlin.version}</version>
  151. <executions>
  152. <execution>
  153. <id>compile</id>
  154. <phase>compile</phase>
  155. <goals>
  156. <goal>compile</goal>
  157. </goals>
  158. </execution>
  159. <execution>
  160. <id>test-compile</id>
  161. <phase>test-compile</phase>
  162. <goals>
  163. <goal>test-compile</goal>
  164. </goals>
  165. </execution>
  166. </executions>
  167. <configuration>
  168. <jvmTarget>1.8</jvmTarget>
  169. </configuration>
  170. </plugin>
  171. <plugin>
  172. <groupId>org.apache.maven.plugins</groupId>
  173. <artifactId>maven-compiler-plugin</artifactId>
  174. <version>3.8.1</version>
  175. <executions>
  176. <execution>
  177. <id>compile</id>
  178. <phase>compile</phase>
  179. <goals>
  180. <goal>compile</goal>
  181. </goals>
  182. </execution>
  183. <execution>
  184. <id>testCompile</id>
  185. <phase>test-compile</phase>
  186. <goals>
  187. <goal>testCompile</goal>
  188. </goals>
  189. </execution>
  190. </executions>
  191. <configuration>
  192. <source>1.8</source>
  193. <target>1.8</target>
  194. <encoding>UTF-8</encoding>
  195. </configuration>
  196. </plugin>
  197. </plugins>
  198. <resources>
  199. <resource>
  200. <directory>src/main/java</directory>
  201. <!-- 此配置不可缺,否则mybatis的Mapper.xml将会丢失 -->
  202. <includes>
  203. <include>**/*.xml</include>
  204. </includes>
  205. </resource>
  206. <resource>
  207. <!--打包时先排除不必要的文件,想要指定加入的再下面的resource指定-->
  208. <directory>${project.basedir}/src/main/resources</directory>
  209. <excludes>
  210. <exclude>profile/**</exclude>
  211. </excludes>
  212. </resource>
  213. <resource>
  214. <!-- 根据不同的环境,把对应文件夹里的配置文件打包-->
  215. <directory>${project.basedir}/src/main/resources/profile/${profiles.active}</directory>
  216. <filtering>true</filtering>
  217. </resource>
  218. </resources>
  219. </build>
  220. </project>