pom.xml 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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-v3</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. <!--netty 服务-->
  115. <dependency>
  116. <groupId>io.netty</groupId>
  117. <artifactId>netty-all</artifactId>
  118. <!--<version>4.1.32.Final</version>-->
  119. <version>4.1.69.Final</version>
  120. </dependency>
  121. </dependencies>
  122. <!--<build>
  123. <resources>
  124. <resource>
  125. <directory>src/main/resources</directory>
  126. <filtering>true</filtering>
  127. </resource>
  128. &lt;!&ndash;需要将xml资源文件一并打包进编译后的结果中&ndash;&gt;
  129. <resource>
  130. <directory>src/main/java</directory>
  131. <includes>
  132. <include>**/*.xml</include>
  133. </includes>
  134. </resource>
  135. </resources>
  136. <plugins>
  137. <plugin>
  138. <groupId>org.apache.maven.plugins</groupId>
  139. <artifactId>maven-compiler-plugin</artifactId>
  140. <configuration>
  141. <source>1.8</source>
  142. <target>1.8</target>
  143. </configuration>
  144. </plugin>
  145. <plugin>
  146. <groupId>org.springframework.boot</groupId>
  147. <artifactId>spring-boot-maven-plugin</artifactId>
  148. <executions>
  149. <execution>
  150. <goals>
  151. <goal>repackage</goal>
  152. </goals>
  153. </execution>
  154. </executions>
  155. </plugin>
  156. &lt;!&ndash;SpringBoot和VUE整合打包&ndash;&gt;
  157. <plugin>
  158. <groupId>org.codehaus.mojo</groupId>
  159. <artifactId>exec-maven-plugin</artifactId>
  160. <executions>
  161. &lt;!&ndash;1、maven执行node的install命令&ndash;&gt;
  162. <execution>
  163. <id>exec-npm-install</id>
  164. &lt;!&ndash;这个阶段很重要,不能乱写,install必须要为第一阶段&ndash;&gt;
  165. <phase>initialize</phase>
  166. <goals>
  167. <goal>exec</goal>
  168. </goals>
  169. <configuration>
  170. <executable>npm</executable>
  171. <arguments>
  172. <argument>install</argument>
  173. </arguments>
  174. &lt;!&ndash;执行install命令的目录&ndash;&gt;
  175. <workingDirectory>${basedir}/src/main/web</workingDirectory>
  176. </configuration>
  177. </execution>
  178. &lt;!&ndash;2、install完成后build&ndash;&gt;
  179. <execution>
  180. <id>exec-npm-run-build</id>
  181. &lt;!&ndash;阶段一定要在复制之前,且在打包和复制都在编译之前&ndash;&gt;
  182. <phase>initialize</phase>
  183. <goals>
  184. <goal>exec</goal>
  185. </goals>
  186. <configuration>
  187. <executable>npm</executable>
  188. <arguments>
  189. <argument>run</argument>
  190. <argument>build</argument>
  191. </arguments>
  192. <workingDirectory>${basedir}/src/main/web</workingDirectory>
  193. <addOutputToClasspath>true</addOutputToClasspath>
  194. </configuration>
  195. </execution>
  196. </executions>
  197. </plugin>
  198. &lt;!&ndash;3、复制打包好的文件到指定目录&ndash;&gt;
  199. <plugin>
  200. <groupId>org.apache.maven.plugins</groupId>
  201. <artifactId>maven-resources-plugin</artifactId>
  202. <configuration>
  203. <encoding>${project.build.sourceEncoding}</encoding>
  204. </configuration>
  205. <executions>
  206. <execution>
  207. <id>copy-spring-boot-webapp</id>
  208. <phase>initialize</phase>
  209. <goals>
  210. <goal>copy-resources</goal>
  211. </goals>
  212. <configuration>
  213. <encoding>utf-8</encoding>
  214. <outputDirectory>${basedir}/src/main/resources/static</outputDirectory>
  215. <resources>
  216. <resource>
  217. <directory>${basedir}/src/main/web/dist</directory>
  218. </resource>
  219. </resources>
  220. </configuration>
  221. </execution>
  222. </executions>
  223. </plugin>
  224. </plugins>
  225. </build>-->
  226. <build>
  227. <plugins>
  228. <plugin>
  229. <groupId>org.apache.maven.plugins</groupId>
  230. <artifactId>maven-compiler-plugin</artifactId>
  231. <configuration>
  232. <source>1.8</source>
  233. <target>1.8</target>
  234. </configuration>
  235. </plugin>
  236. <plugin>
  237. <groupId>org.springframework.boot</groupId>
  238. <artifactId>spring-boot-maven-plugin</artifactId>
  239. <executions>
  240. <execution>
  241. <goals>
  242. <goal>repackage</goal>
  243. </goals>
  244. </execution>
  245. </executions>
  246. </plugin>
  247. </plugins>
  248. </build>
  249. </project>