pom.xml 7.8 KB

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