pom.xml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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. <!--mysql 驱动-->
  61. <dependency>
  62. <groupId>mysql</groupId>
  63. <artifactId>mysql-connector-java</artifactId>
  64. <version>${mysql.connector.version}</version>
  65. </dependency>
  66. <!--swagger 最新依赖内置版本-->
  67. <dependency>
  68. <groupId>io.swagger</groupId>
  69. <artifactId>swagger-models</artifactId>
  70. <version>${swagger.core.version}</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>io.swagger</groupId>
  74. <artifactId>swagger-annotations</artifactId>
  75. <version>${swagger.core.version}</version>
  76. </dependency>
  77. <dependency>
  78. <groupId>io.jsonwebtoken</groupId>
  79. <artifactId>jjwt</artifactId>
  80. <version>${jjwt.version}</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>cn.hutool</groupId>
  84. <artifactId>hutool-all</artifactId>
  85. <version>${hutool.version}</version>
  86. </dependency>
  87. <!-- Quartz定时任务 -->
  88. <dependency>
  89. <groupId>org.springframework.boot</groupId>
  90. <artifactId>spring-boot-starter-quartz</artifactId>
  91. </dependency>
  92. <!-- MybatisPlus -->
  93. <dependency>
  94. <groupId>com.baomidou</groupId>
  95. <artifactId>mybatis-plus-boot-starter</artifactId>
  96. <version>3.4.1</version>
  97. </dependency>
  98. <!-- 验证码 -->
  99. <dependency>
  100. <groupId>com.github.penggle</groupId>
  101. <artifactId>kaptcha</artifactId>
  102. <version>2.3.2</version>
  103. </dependency>
  104. <!-- druid 连接池 -->
  105. <dependency>
  106. <groupId>com.alibaba</groupId>
  107. <artifactId>druid-spring-boot-starter</artifactId>
  108. <version>1.1.22</version>
  109. </dependency>
  110. <dependency>
  111. <groupId>org.springframework.boot</groupId>
  112. <artifactId>spring-boot-starter-security</artifactId>
  113. </dependency>
  114. <dependency>
  115. <groupId>junit</groupId>
  116. <artifactId>junit</artifactId>
  117. </dependency>
  118. <dependency>
  119. <groupId>org.jsoup</groupId>
  120. <artifactId>jsoup</artifactId>
  121. <version>1.10.2</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.projectlombok</groupId>
  125. <artifactId>lombok</artifactId>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.springframework.boot</groupId>
  129. <artifactId>spring-boot-starter-undertow</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. <plugins>
  219. <!--跳过test类-->
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-surefire-plugin</artifactId>
  223. <version>2.21.0</version>
  224. <configuration>
  225. <skipTests>true</skipTests>
  226. </configuration>
  227. </plugin>
  228. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  229. <plugin>
  230. <groupId>org.apache.maven.plugins</groupId>
  231. <artifactId>maven-clean-plugin</artifactId>
  232. <version>3.1.0</version>
  233. <configuration>
  234. <filesets>
  235. <fileset>
  236. <!-- 前端资源目录,即:存放前端包目录-->
  237. <directory>src/main/resources/static</directory>
  238. </fileset>
  239. <fileset>
  240. <!-- Vue项目打包自动生成的dist目录 -->
  241. <directory>../ui/dist</directory>
  242. </fileset>
  243. </filesets>
  244. </configuration>
  245. </plugin>
  246. <!--frontend-maven-plugin为项目本地下载/安装Node和NPM,运行npm install命令-->
  247. <plugin>
  248. <groupId>com.github.eirslett</groupId>
  249. <artifactId>frontend-maven-plugin</artifactId>
  250. <version>1.6</version>
  251. <configuration>
  252. <workingDirectory>../ui</workingDirectory>
  253. </configuration>
  254. <executions>
  255. <execution>
  256. <id>install node and npm</id>
  257. <goals>
  258. <goal>install-node-and-npm</goal>
  259. </goals>
  260. <configuration>
  261. <nodeVersion>v16.13.1</nodeVersion>
  262. <npmVersion>8.1.2</npmVersion>
  263. </configuration>
  264. </execution>
  265. <!-- Install all project dependencies -->
  266. <execution>
  267. <id>npm install</id>
  268. <goals>
  269. <goal>npm</goal>
  270. </goals>
  271. <phase>generate-resources</phase>
  272. <configuration>
  273. <arguments>install</arguments>
  274. </configuration>
  275. </execution>
  276. <!-- Build and minify static files -->
  277. <execution>
  278. <id>npm run build</id>
  279. <goals>
  280. <goal>npm</goal>
  281. </goals>
  282. <configuration>
  283. <arguments>run build:prod</arguments>
  284. </configuration>
  285. </execution>
  286. </executions>
  287. </plugin>
  288. <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
  289. <plugin>
  290. <groupId>org.apache.maven.plugins</groupId>
  291. <artifactId>maven-resources-plugin</artifactId>
  292. <version>3.1.0</version>
  293. <executions>
  294. <execution>
  295. <id>copy static</id>
  296. <phase>generate-resources</phase>
  297. <goals>
  298. <goal>copy-resources</goal>
  299. </goals>
  300. <configuration>
  301. <!-- 复制前端打包文件到这里 -->
  302. <outputDirectory>src/main/resources/static</outputDirectory>
  303. <overwrite>true</overwrite>
  304. <resources>
  305. <resource>
  306. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  307. <directory>${project.parent.basedir}/ui/dist</directory>
  308. <includes>
  309. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  310. <include>assets/</include>
  311. <include>favicon.ico</include>
  312. <include>index.html</include>
  313. </includes>
  314. </resource>
  315. </resources>
  316. </configuration>
  317. </execution>
  318. </executions>
  319. </plugin>
  320. <plugin>
  321. <groupId>org.springframework.boot</groupId>
  322. <artifactId>spring-boot-maven-plugin</artifactId>
  323. <version>2.1.7.RELEASE</version>
  324. <configuration>
  325. <!--控制是否启用支持Linux下service方式运行-->
  326. <executable>true</executable>
  327. <!--打包后自动运行程序-->
  328. <!-- <includeSystemScope>true</includeSystemScope>-->
  329. </configuration>
  330. <executions>
  331. <execution>
  332. <goals>
  333. <goal>build-info</goal>
  334. <goal>repackage</goal>
  335. </goals>
  336. </execution>
  337. </executions>
  338. </plugin>
  339. </plugins>
  340. </build>
  341. <!--上传配置 必须 -->
  342. <distributionManagement>
  343. <repository>
  344. <id>jiayue-releases</id>
  345. <name>Nexus Release Repository</name>
  346. <url>http://49.4.68.219:8888/repository/jiayue-releases/</url>
  347. </repository>
  348. <snapshotRepository>
  349. <id>jiayue-snapshots</id>
  350. <name>Nexus Snapshot Repository</name>
  351. <url>http://49.4.68.219:8888/repository/jiayue-snapshots/</url>
  352. </snapshotRepository>
  353. </distributionManagement>
  354. </project>