pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <parent>
  5. <artifactId>ssi</artifactId>
  6. <groupId>com.jiayue.ssi</groupId>
  7. <version>1.0.0</version>
  8. </parent>
  9. <modelVersion>4.0.0</modelVersion>
  10. <artifactId>backend</artifactId>
  11. <version>1.0.0</version>
  12. <name>backend</name>
  13. <properties>
  14. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  15. <java.version>1.8</java.version>
  16. <spring-boot.version>2.2.1.RELEASE</spring-boot.version>
  17. <spring-platform.version>Cairo-SR8</spring-platform.version>
  18. <spring-boot-admin.version>2.2.0</spring-boot-admin.version>
  19. <jjwt.version>0.9.0</jjwt.version>
  20. <javajwt.version>3.4.0</javajwt.version>
  21. <slf4j.version>1.7.26</slf4j.version>
  22. <commons-lang3.version>3.9</commons-lang3.version>
  23. <byte-buddy.version>1.8.17</byte-buddy.version>
  24. <jackson-databind.version>2.9.8</jackson-databind.version>
  25. <!--<mysql.connector.version>5.1.46</mysql.connector.version>-->
  26. <mysql.connector.version>8.0.18</mysql.connector.version>
  27. <hibernate.version>6.0.14.Final</hibernate.version>
  28. <jasypt-boot.version>3.0.3</jasypt-boot.version>
  29. <commons-pool2.version>2.7.0</commons-pool2.version>
  30. <jedis.version>3.1.0</jedis.version>
  31. <quartz.version>2.3.1</quartz.version>
  32. <hutool.version>5.8.12</hutool.version>
  33. <knife4j.version>2.0.1</knife4j.version>
  34. <ttl.version>2.11.2</ttl.version>
  35. <swagger.core.version>1.5.22</swagger.core.version>
  36. <mybatis-plus-generator.version>3.1.1</mybatis-plus-generator.version>
  37. <maven.compiler.source>1.8</maven.compiler.source>
  38. <maven.compiler.target>1.8</maven.compiler.target>
  39. </properties>
  40. <dependencies>
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-dependencies</artifactId>
  44. <version>${spring-boot.version}</version>
  45. <type>pom</type>
  46. </dependency>
  47. <!--web 模块-->
  48. <dependency>
  49. <groupId>org.springframework.boot</groupId>
  50. <artifactId>spring-boot-starter-web</artifactId>
  51. <version>${spring-boot.version}</version>
  52. <exclusions>
  53. <!--排除tomcat依赖-->
  54. <exclusion>
  55. <artifactId>spring-boot-starter-tomcat</artifactId>
  56. <groupId>org.springframework.boot</groupId>
  57. </exclusion>
  58. </exclusions>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-starter-undertow</artifactId>
  63. </dependency>
  64. <!--mysql 驱动-->
  65. <dependency>
  66. <groupId>mysql</groupId>
  67. <artifactId>mysql-connector-java</artifactId>
  68. <version>${mysql.connector.version}</version>
  69. </dependency>
  70. <!--swagger 最新依赖内置版本-->
  71. <dependency>
  72. <groupId>io.swagger</groupId>
  73. <artifactId>swagger-models</artifactId>
  74. <version>${swagger.core.version}</version>
  75. </dependency>
  76. <dependency>
  77. <groupId>io.swagger</groupId>
  78. <artifactId>swagger-annotations</artifactId>
  79. <version>${swagger.core.version}</version>
  80. </dependency>
  81. <dependency>
  82. <groupId>io.jsonwebtoken</groupId>
  83. <artifactId>jjwt</artifactId>
  84. <version>${jjwt.version}</version>
  85. </dependency>
  86. <dependency>
  87. <groupId>cn.hutool</groupId>
  88. <artifactId>hutool-all</artifactId>
  89. <version>${hutool.version}</version>
  90. </dependency>
  91. <!-- Quartz定时任务 -->
  92. <dependency>
  93. <groupId>org.springframework.boot</groupId>
  94. <artifactId>spring-boot-starter-quartz</artifactId>
  95. </dependency>
  96. <!-- MybatisPlus -->
  97. <dependency>
  98. <groupId>com.baomidou</groupId>
  99. <artifactId>mybatis-plus-boot-starter</artifactId>
  100. <version>3.4.1</version>
  101. </dependency>
  102. <!-- 验证码 -->
  103. <dependency>
  104. <groupId>com.github.penggle</groupId>
  105. <artifactId>kaptcha</artifactId>
  106. <version>2.3.2</version>
  107. </dependency>
  108. <!-- druid 连接池 -->
  109. <dependency>
  110. <groupId>com.alibaba</groupId>
  111. <artifactId>druid-spring-boot-starter</artifactId>
  112. <version>1.1.22</version>
  113. </dependency>
  114. <dependency>
  115. <groupId>org.springframework.boot</groupId>
  116. <artifactId>spring-boot-starter-security</artifactId>
  117. </dependency>
  118. <dependency>
  119. <groupId>junit</groupId>
  120. <artifactId>junit</artifactId>
  121. </dependency>
  122. <dependency>
  123. <groupId>org.jsoup</groupId>
  124. <artifactId>jsoup</artifactId>
  125. <version>1.10.2</version>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.projectlombok</groupId>
  129. <artifactId>lombok</artifactId>
  130. </dependency>
  131. <dependency>
  132. <groupId>org.springframework.boot</groupId>
  133. <artifactId>spring-boot-starter-test</artifactId>
  134. <scope>test</scope>
  135. </dependency>
  136. <dependency>
  137. <groupId>com.github.pagehelper</groupId>
  138. <artifactId>pagehelper-spring-boot-starter</artifactId>
  139. <version>1.3.0</version>
  140. </dependency>
  141. <dependency>
  142. <groupId>org.apache.commons</groupId>
  143. <artifactId>commons-lang3</artifactId>
  144. <version>3.12.0</version>
  145. </dependency>
  146. <!--配置文件处理器-->
  147. <dependency>
  148. <groupId>org.springframework.boot</groupId>
  149. <artifactId>spring-boot-configuration-processor</artifactId>
  150. <optional>true</optional>
  151. </dependency>
  152. <!--jasypt配置文件加解密-->
  153. <dependency>
  154. <groupId>com.github.ulisesbocchio</groupId>
  155. <artifactId>jasypt-spring-boot-starter</artifactId>
  156. <version>${jasypt-boot.version}</version>
  157. </dependency>
  158. <dependency>
  159. <groupId>com.github.whvcse</groupId>
  160. <artifactId>easy-captcha</artifactId>
  161. <version>1.6.2</version>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.springframework.boot</groupId>
  165. <artifactId>spring-boot-starter-mail</artifactId>
  166. </dependency>
  167. <dependency>
  168. <groupId>commons-io</groupId>
  169. <artifactId>commons-io</artifactId>
  170. <version>2.6</version>
  171. </dependency>
  172. <!-- AOP依赖 -->
  173. <dependency>
  174. <groupId>org.springframework.boot</groupId>
  175. <artifactId>spring-boot-starter-aop</artifactId>
  176. </dependency>
  177. <!-- Map依赖 -->
  178. <dependency>
  179. <groupId>net.jodah</groupId>
  180. <artifactId>expiringmap</artifactId>
  181. <version>0.5.8</version>
  182. </dependency>
  183. <dependency>
  184. <groupId>org.bouncycastle</groupId>
  185. <artifactId>bcprov-jdk15to18</artifactId>
  186. <version>1.72</version>
  187. </dependency>
  188. <!-- 获取系统信息 -->
  189. <dependency>
  190. <groupId>com.github.oshi</groupId>
  191. <artifactId>oshi-core</artifactId>
  192. <version>6.4.0</version>
  193. </dependency>
  194. <dependency>
  195. <groupId>net.java.dev.jna</groupId>
  196. <artifactId>jna</artifactId>
  197. <version>5.5.0</version>
  198. </dependency>
  199. <dependency>
  200. <groupId>net.java.dev.jna</groupId>
  201. <artifactId>jna-platform</artifactId>
  202. <version>5.5.0</version>
  203. </dependency>
  204. <!-- 解析客户端操作系统、浏览器等 -->
  205. <dependency>
  206. <groupId>eu.bitwalker</groupId>
  207. <artifactId>UserAgentUtils</artifactId>
  208. <version>1.21</version>
  209. </dependency>
  210. <!-- 阿里JSON解析器 -->
  211. <dependency>
  212. <groupId>com.alibaba.fastjson2</groupId>
  213. <artifactId>fastjson2</artifactId>
  214. <version>2.0.23</version>
  215. </dependency>
  216. </dependencies>
  217. <build>
  218. <finalName>ssi</finalName>
  219. <plugins>
  220. <!--跳过test类-->
  221. <plugin>
  222. <groupId>org.apache.maven.plugins</groupId>
  223. <artifactId>maven-surefire-plugin</artifactId>
  224. <version>2.21.0</version>
  225. <configuration>
  226. <skipTests>true</skipTests>
  227. </configuration>
  228. </plugin>
  229. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  230. <plugin>
  231. <groupId>org.apache.maven.plugins</groupId>
  232. <artifactId>maven-clean-plugin</artifactId>
  233. <version>3.1.0</version>
  234. <configuration>
  235. <filesets>
  236. <fileset>
  237. <!-- 前端资源目录,即:存放前端包目录-->
  238. <directory>src/main/resources/static</directory>
  239. </fileset>
  240. <fileset>
  241. <!-- Vue项目打包自动生成的dist目录 -->
  242. <directory>../ui/dist</directory>
  243. </fileset>
  244. </filesets>
  245. </configuration>
  246. </plugin>
  247. <!--frontend-maven-plugin为项目本地下载/安装Node和NPM,运行npm install命令-->
  248. <plugin>
  249. <groupId>com.github.eirslett</groupId>
  250. <artifactId>frontend-maven-plugin</artifactId>
  251. <version>1.6</version>
  252. <configuration>
  253. <workingDirectory>../ui</workingDirectory>
  254. <nodeVersion>v16.13.1</nodeVersion>
  255. <npmVersion>8.1.2</npmVersion>
  256. <nodeDownloadRoot>https://npm.taobao.org/mirrors/node/</nodeDownloadRoot>
  257. <npmDownloadRoot>https://registry.npm.taobao.org/npm/-/</npmDownloadRoot>
  258. </configuration>
  259. <executions>
  260. <execution>
  261. <id>install node and npm</id>
  262. <goals>
  263. <goal>install-node-and-npm</goal>
  264. </goals>
  265. </execution>
  266. <!-- Install all project dependencies -->
  267. <execution>
  268. <id>npm install</id>
  269. <goals>
  270. <goal>npm</goal>
  271. </goals>
  272. <phase>generate-resources</phase>
  273. <configuration>
  274. <arguments>install</arguments>
  275. </configuration>
  276. </execution>
  277. <!-- Build and minify static files -->
  278. <execution>
  279. <id>npm run build</id>
  280. <goals>
  281. <goal>npm</goal>
  282. </goals>
  283. <configuration>
  284. <arguments>run build:prod</arguments>
  285. </configuration>
  286. </execution>
  287. </executions>
  288. </plugin>
  289. <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
  290. <plugin>
  291. <groupId>org.apache.maven.plugins</groupId>
  292. <artifactId>maven-resources-plugin</artifactId>
  293. <version>3.1.0</version>
  294. <executions>
  295. <execution>
  296. <id>copy static</id>
  297. <phase>generate-resources</phase>
  298. <goals>
  299. <goal>copy-resources</goal>
  300. </goals>
  301. <configuration>
  302. <!-- 复制前端打包文件到这里 -->
  303. <outputDirectory>src/main/resources/static</outputDirectory>
  304. <overwrite>true</overwrite>
  305. <resources>
  306. <resource>
  307. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  308. <directory>${project.parent.basedir}/ui/dist</directory>
  309. <includes>
  310. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  311. <include>assets/</include>
  312. <include>favicon.ico</include>
  313. <include>index.html</include>
  314. </includes>
  315. </resource>
  316. </resources>
  317. </configuration>
  318. </execution>
  319. </executions>
  320. </plugin>
  321. <plugin>
  322. <groupId>org.springframework.boot</groupId>
  323. <artifactId>spring-boot-maven-plugin</artifactId>
  324. <version>2.1.7.RELEASE</version>
  325. <configuration>
  326. <!--控制是否启用支持Linux下service方式运行-->
  327. <executable>true</executable>
  328. <!--打包后自动运行程序-->
  329. <!-- <includeSystemScope>true</includeSystemScope>-->
  330. </configuration>
  331. <executions>
  332. <execution>
  333. <goals>
  334. <goal>build-info</goal>
  335. <goal>repackage</goal>
  336. </goals>
  337. </execution>
  338. </executions>
  339. </plugin>
  340. </plugins>
  341. </build>
  342. <!--上传配置 必须 -->
  343. <distributionManagement>
  344. <repository>
  345. <id>jiayue-releases</id>
  346. <name>Nexus Release Repository</name>
  347. <url>http://49.4.68.219:8888/repository/jiayue-releases/</url>
  348. </repository>
  349. <snapshotRepository>
  350. <id>jiayue-snapshots</id>
  351. <name>Nexus Snapshot Repository</name>
  352. <url>http://49.4.68.219:8888/repository/jiayue-snapshots/</url>
  353. </snapshotRepository>
  354. </distributionManagement>
  355. </project>