pom.xml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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>cpp</artifactId>
  7. <groupId>com.jiayue.cpp</groupId>
  8. <version>3.8.8</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <packaging>jar</packaging>
  12. <artifactId>cpp-admin</artifactId>
  13. <description>
  14. web服务入口
  15. </description>
  16. <dependencies>
  17. <dependency>
  18. <groupId>org.yaml</groupId>
  19. <artifactId>snakeyaml</artifactId>
  20. <version>1.33</version>
  21. </dependency>
  22. <!-- spring-boot-devtools -->
  23. <dependency>
  24. <groupId>org.springframework.boot</groupId>
  25. <artifactId>spring-boot-devtools</artifactId>
  26. <optional>true</optional> <!-- 表示依赖不会传递 -->
  27. </dependency>
  28. <!-- swagger3-->
  29. <dependency>
  30. <groupId>io.springfox</groupId>
  31. <artifactId>springfox-boot-starter</artifactId>
  32. </dependency>
  33. <!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
  34. <dependency>
  35. <groupId>io.swagger</groupId>
  36. <artifactId>swagger-models</artifactId>
  37. <version>1.6.2</version>
  38. </dependency>
  39. <!-- Mysql驱动包 -->
  40. <dependency>
  41. <groupId>mysql</groupId>
  42. <artifactId>mysql-connector-java</artifactId>
  43. </dependency>
  44. <!-- 核心模块-->
  45. <dependency>
  46. <groupId>com.jiayue.cpp</groupId>
  47. <artifactId>cpp-framework</artifactId>
  48. </dependency>
  49. <!-- 定时任务-->
  50. <dependency>
  51. <groupId>com.jiayue.cpp</groupId>
  52. <artifactId>cpp-quartz</artifactId>
  53. </dependency>
  54. <!-- 代码生成-->
  55. <dependency>
  56. <groupId>com.jiayue.cpp</groupId>
  57. <artifactId>cpp-generator</artifactId>
  58. </dependency>
  59. <dependency>
  60. <groupId>org.springframework.boot</groupId>
  61. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.projectlombok</groupId>
  65. <artifactId>lombok</artifactId>
  66. </dependency>
  67. <!-- ftp-->
  68. <dependency>
  69. <groupId>commons-net</groupId>
  70. <artifactId>commons-net</artifactId>
  71. <version>3.3</version>
  72. </dependency>
  73. <dependency>
  74. <groupId>cn.hutool</groupId>
  75. <artifactId>hutool-all</artifactId>
  76. <version>5.8.12</version>
  77. </dependency>
  78. <!--准确率计算-->
  79. <dependency>
  80. <groupId>com.syjy</groupId>
  81. <artifactId>calculation-spring-boot-starter</artifactId>
  82. <version>0.0.39</version>
  83. <exclusions>
  84. <exclusion>
  85. <groupId>com.alibaba.cloud</groupId>
  86. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  87. </exclusion>
  88. </exclusions>
  89. </dependency>
  90. <dependency>
  91. <groupId>org.apache.poi</groupId>
  92. <artifactId>poi-ooxml</artifactId>
  93. <version>3.17</version>
  94. </dependency>
  95. <!-- SSH安全连接所使用的类库 -->
  96. <dependency>
  97. <groupId>com.jcraft</groupId>
  98. <artifactId>jsch</artifactId>
  99. <version>0.1.55</version>
  100. <scope>compile</scope>
  101. <optional>true</optional>
  102. </dependency>
  103. </dependencies>
  104. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  105. <profile>
  106. <id>window</id>
  107. <properties>
  108. <npm>npm.cmd</npm>
  109. </properties>
  110. <activation>
  111. <activeByDefault>true</activeByDefault>
  112. </activation>
  113. </profile>
  114. <profile>
  115. <id>linux</id>
  116. <properties>
  117. <npm>npm</npm>
  118. </properties>
  119. </profile>
  120. </profiles>
  121. <build>
  122. <finalName>cpp</finalName>
  123. <plugins>
  124. <!--跳过test类-->
  125. <plugin>
  126. <groupId>org.apache.maven.plugins</groupId>
  127. <artifactId>maven-surefire-plugin</artifactId>
  128. <version>2.21.0</version>
  129. <configuration>
  130. <skipTests>true</skipTests>
  131. </configuration>
  132. </plugin>
  133. <plugin>
  134. <groupId>org.codehaus.mojo</groupId>
  135. <artifactId>exec-maven-plugin</artifactId>
  136. <version>1.6.0</version>
  137. <executions>
  138. <execution>
  139. <id>exec-npm-run-build</id>
  140. <phase>generate-resources</phase>
  141. <goals>
  142. <goal>exec</goal>
  143. </goals>
  144. <configuration>
  145. <executable>${npm}</executable>
  146. <arguments>
  147. <argument>run</argument>
  148. <argument>build:prod</argument>
  149. </arguments>
  150. <workingDirectory>${project.parent.basedir}/cpp-ui</workingDirectory>
  151. </configuration>
  152. </execution>
  153. </executions>
  154. </plugin>
  155. <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
  156. <plugin>
  157. <groupId>org.apache.maven.plugins</groupId>
  158. <artifactId>maven-resources-plugin</artifactId>
  159. <version>3.1.0</version>
  160. <executions>
  161. <execution>
  162. <id>copy index</id>
  163. <phase>generate-resources</phase>
  164. <goals>
  165. <goal>copy-resources</goal>
  166. </goals>
  167. <configuration>
  168. <!-- 复制前端打包文件到这里 -->
  169. <outputDirectory>src/main/resources/templates</outputDirectory>
  170. <overwrite>true</overwrite>
  171. <resources>
  172. <resource>
  173. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  174. <directory>${project.parent.basedir}/cpp-ui/dist</directory>
  175. <includes>
  176. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  177. <include>index.html</include>
  178. </includes>
  179. </resource>
  180. </resources>
  181. </configuration>
  182. </execution>
  183. <execution>
  184. <id>copy static</id>
  185. <phase>generate-resources</phase>
  186. <goals>
  187. <goal>copy-resources</goal>
  188. </goals>
  189. <configuration>
  190. <!-- 复制前端打包文件到这里 -->
  191. <outputDirectory>src/main/resources</outputDirectory>
  192. <overwrite>true</overwrite>
  193. <resources>
  194. <resource>
  195. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  196. <directory>${project.parent.basedir}/cpp-ui/dist</directory>
  197. <includes>
  198. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  199. <include>static/</include>
  200. </includes>
  201. </resource>
  202. </resources>
  203. </configuration>
  204. </execution>
  205. </executions>
  206. </plugin>
  207. <plugin>
  208. <groupId>org.springframework.boot</groupId>
  209. <artifactId>spring-boot-maven-plugin</artifactId>
  210. <version>2.1.7.RELEASE</version>
  211. <configuration>
  212. <!--控制是否启用支持Linux下service方式运行-->
  213. <executable>true</executable>
  214. <!--打包后自动运行程序-->
  215. <!-- <includeSystemScope>true</includeSystemScope>-->
  216. </configuration>
  217. <executions>
  218. <execution>
  219. <goals>
  220. <goal>build-info</goal>
  221. <goal>repackage</goal>
  222. </goals>
  223. </execution>
  224. </executions>
  225. </plugin>
  226. </plugins>
  227. </build>
  228. </project>