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