pom.xml 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <parent>
  6. <artifactId>tms-middleware</artifactId>
  7. <groupId>com.tokheim</groupId>
  8. <version>1.0-SNAPSHOT</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>sgs-middleware</artifactId>
  12. <dependencies>
  13. <!--spring-boot-starter-web-->
  14. <dependency>
  15. <groupId>org.springframework.boot</groupId>
  16. <artifactId>spring-boot-starter-web</artifactId>
  17. </dependency>
  18. <!--http 客户端-->
  19. <dependency>
  20. <groupId>org.apache.httpcomponents</groupId>
  21. <artifactId>httpclient</artifactId>
  22. </dependency>
  23. <!-- 通用Mapper -->
  24. <dependency>
  25. <groupId>tk.mybatis</groupId>
  26. <artifactId>mapper-spring-boot-starter</artifactId>
  27. </dependency>
  28. <!-- mybatis 插件-->
  29. <dependency>
  30. <groupId>com.github.miemiedev</groupId>
  31. <artifactId>mybatis-paginator</artifactId>
  32. </dependency>
  33. <!-- 数据库连接 -->
  34. <!-- mysql -->
  35. <dependency>
  36. <groupId>mysql</groupId>
  37. <artifactId>mysql-connector-java</artifactId>
  38. </dependency>
  39. <!-- mariadb 版本数据库连接-->
  40. <dependency>
  41. <groupId>org.mariadb.jdbc</groupId>
  42. <artifactId>mariadb-java-client</artifactId>
  43. </dependency>
  44. <!-- jdbc 连接数据库-->
  45. <dependency>
  46. <groupId>org.springframework.boot</groupId>
  47. <artifactId>spring-boot-starter-jdbc</artifactId>
  48. </dependency>
  49. <!-- 下面两个依赖二选一,只是在配置文件中的写法不同而已 -->
  50. <!-- druid连接池 -->
  51. <!-- <dependency>
  52. <groupId>com.alibaba</groupId>
  53. <artifactId>druid</artifactId>
  54. </dependency>-->
  55. <!--阿里数据库连接池 -->
  56. <dependency>
  57. <groupId>com.alibaba</groupId>
  58. <artifactId>druid-spring-boot-starter</artifactId>
  59. </dependency>
  60. <!--ali-fastjson-->
  61. <dependency>
  62. <groupId>com.alibaba</groupId>
  63. <artifactId>fastjson</artifactId>
  64. </dependency>
  65. <!--分页插件-->
  66. <dependency>
  67. <groupId>com.github.pagehelper</groupId>
  68. <artifactId>pagehelper</artifactId>
  69. </dependency>
  70. <!--mybatis-springboot-->
  71. <dependency>
  72. <groupId>org.mybatis.spring.boot</groupId>
  73. <artifactId>mybatis-spring-boot-starter</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>io.jsonwebtoken</groupId>
  77. <artifactId>jjwt</artifactId>
  78. <version>0.9.0</version>
  79. </dependency>
  80. <!-- 加入httpClient依赖 -->
  81. <dependency>
  82. <groupId>commons-httpclient</groupId>
  83. <artifactId>commons-httpclient</artifactId>
  84. <version>3.1</version>
  85. </dependency>
  86. <!--常用工具类 -->
  87. <dependency>
  88. <groupId>org.apache.commons</groupId>
  89. <artifactId>commons-lang3</artifactId>
  90. <version>3.8.1</version>
  91. </dependency>
  92. <!--接口文档swagger-->
  93. <dependency>
  94. <groupId>io.springfox</groupId>
  95. <artifactId>springfox-swagger2</artifactId>
  96. <version>2.9.2</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>io.springfox</groupId>
  100. <artifactId>springfox-swagger-ui</artifactId>
  101. <version>2.9.2</version>
  102. </dependency>
  103. <!--lombok-->
  104. <dependency>
  105. <groupId>org.projectlombok</groupId>
  106. <artifactId>lombok</artifactId>
  107. <scope>provided</scope>
  108. </dependency>
  109. <!-- Java工具类库 https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
  110. <dependency>
  111. <groupId>cn.hutool</groupId>
  112. <artifactId>hutool-all</artifactId>
  113. </dependency>
  114. </dependencies>
  115. <build>
  116. <resources>
  117. <resource>
  118. <directory>src/main/resources</directory>
  119. <filtering>true</filtering>
  120. </resource>
  121. <!--需要将xml资源文件一并打包进编译后的结果中-->
  122. <resource>
  123. <directory>src/main/java</directory>
  124. <includes>
  125. <include>**/*.xml</include>
  126. </includes>
  127. </resource>
  128. </resources>
  129. <plugins>
  130. <plugin>
  131. <groupId>org.apache.maven.plugins</groupId>
  132. <artifactId>maven-compiler-plugin</artifactId>
  133. <configuration>
  134. <source>1.8</source>
  135. <target>1.8</target>
  136. </configuration>
  137. </plugin>
  138. <plugin>
  139. <groupId>org.springframework.boot</groupId>
  140. <artifactId>spring-boot-maven-plugin</artifactId>
  141. <executions>
  142. <execution>
  143. <goals>
  144. <goal>repackage</goal>
  145. </goals>
  146. </execution>
  147. </executions>
  148. </plugin>
  149. <!--SpringBoot和VUE整合打包-->
  150. <plugin>
  151. <groupId>org.codehaus.mojo</groupId>
  152. <artifactId>exec-maven-plugin</artifactId>
  153. <executions>
  154. <!--1、maven执行node的install命令-->
  155. <execution>
  156. <id>exec-npm-install</id>
  157. <!--这个阶段很重要,不能乱写,install必须要为第一阶段-->
  158. <phase>initialize</phase>
  159. <goals>
  160. <goal>exec</goal>
  161. </goals>
  162. <configuration>
  163. <executable>npm</executable>
  164. <arguments>
  165. <argument>install</argument>
  166. </arguments>
  167. <!--执行install命令的目录-->
  168. <workingDirectory>${basedir}/src/main/web</workingDirectory>
  169. </configuration>
  170. </execution>
  171. <!--2、install完成后build-->
  172. <execution>
  173. <id>exec-npm-run-build</id>
  174. <!--阶段一定要在复制之前,且在打包和复制都在编译之前-->
  175. <phase>initialize</phase>
  176. <goals>
  177. <goal>exec</goal>
  178. </goals>
  179. <configuration>
  180. <executable>npm</executable>
  181. <arguments>
  182. <argument>run</argument>
  183. <argument>build</argument>
  184. </arguments>
  185. <workingDirectory>${basedir}/src/main/web</workingDirectory>
  186. <addOutputToClasspath>true</addOutputToClasspath>
  187. </configuration>
  188. </execution>
  189. </executions>
  190. </plugin>
  191. <!--3、复制打包好的文件到指定目录-->
  192. <plugin>
  193. <groupId>org.apache.maven.plugins</groupId>
  194. <artifactId>maven-resources-plugin</artifactId>
  195. <configuration>
  196. <encoding>${project.build.sourceEncoding}</encoding>
  197. </configuration>
  198. <executions>
  199. <execution>
  200. <id>copy-spring-boot-webapp</id>
  201. <phase>initialize</phase>
  202. <goals>
  203. <goal>copy-resources</goal>
  204. </goals>
  205. <configuration>
  206. <encoding>utf-8</encoding>
  207. <outputDirectory>${basedir}/src/main/resources/static</outputDirectory>
  208. <resources>
  209. <resource>
  210. <directory>${basedir}/src/main/web/dist</directory>
  211. </resource>
  212. </resources>
  213. </configuration>
  214. </execution>
  215. </executions>
  216. </plugin>
  217. </plugins>
  218. </build>
  219. </project>