pom.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  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>elf</artifactId>
  7. <groupId>com.jiayue</groupId>
  8. <version>3.8.6</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>vpp-biz</artifactId>
  12. <description>
  13. 沈阳嘉越电力交易辅助系统
  14. </description>
  15. <dependencies>
  16. <!-- spring-boot-devtools -->
  17. <dependency>
  18. <groupId>org.springframework.boot</groupId>
  19. <artifactId>spring-boot-devtools</artifactId>
  20. <optional>true</optional> <!-- 表示依赖不会传递 -->
  21. </dependency>
  22. <!-- 系统服务-->
  23. <dependency>
  24. <groupId>com.jiayue</groupId>
  25. <artifactId>elf-system</artifactId>
  26. </dependency>
  27. <dependency>
  28. <groupId>com.dameng</groupId>
  29. <artifactId>Dm7JdbcDriver18</artifactId>
  30. <version>7.6.0.165</version>
  31. <!--<systemPath>${project.basedir}/lib/Dm7JdbcDriver18-7.6.0.165.jar</systemPath>-->
  32. </dependency>
  33. <!-- spring-boot-thymeleaf -->
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  37. </dependency>
  38. </dependencies>
  39. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  40. <profile>
  41. <id>window</id>
  42. <properties>
  43. <npm>npm.cmd</npm>
  44. </properties>
  45. <activation>
  46. <activeByDefault>true</activeByDefault>
  47. </activation>
  48. </profile>
  49. <profile>
  50. <id>linux</id>
  51. <properties>
  52. <npm>npm</npm>
  53. </properties>
  54. </profile>
  55. </profiles>
  56. <build>
  57. <resources>
  58. <resource>
  59. <directory>src/main/resources</directory>
  60. <!--开启过滤,用指定的参数替换directory下的文件中的参数-->
  61. <filtering>true</filtering>
  62. </resource>
  63. </resources>
  64. <plugins>
  65. <plugin>
  66. <groupId>org.springframework.boot</groupId>
  67. <artifactId>spring-boot-maven-plugin</artifactId>
  68. <version>2.1.7.RELEASE</version>
  69. <!--解决打包后,执行java -jar 命令,找不到主清单属性-->
  70. <executions>
  71. <execution>
  72. <phase>package</phase>
  73. <goals>
  74. <goal>repackage</goal>
  75. </goals>
  76. </execution>
  77. </executions>
  78. </plugin>
  79. <!--clean插件-->
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-clean-plugin</artifactId>
  83. <version>3.1.0</version>
  84. <configuration>
  85. <filesets>
  86. <fileset>
  87. <directory>src/main/resources/static</directory>
  88. </fileset>
  89. <fileset>
  90. <directory>src/main/resources/templates</directory>
  91. </fileset>
  92. </filesets>
  93. </configuration>
  94. </plugin>
  95. <!--跳过test类-->
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-surefire-plugin</artifactId>
  99. <version>2.21.0</version>
  100. <configuration>
  101. <skipTests>true</skipTests>
  102. </configuration>
  103. </plugin>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-jar-plugin</artifactId>
  107. <version>2.6</version>
  108. </plugin>
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-compiler-plugin</artifactId>
  112. <version>3.0</version>
  113. <configuration>
  114. <source>1.8</source>
  115. <target>1.8</target>
  116. <compilerArguments>
  117. <!-- 不写,默认只有rt.jar -->
  118. <bootclasspath>${java.home}/lib/rt.jar${path.separator}${java.home}/lib/jce.jar</bootclasspath>
  119. </compilerArguments>
  120. </configuration>
  121. </plugin>
  122. <!--资源插件,主要为了从前端项目里复制打包好的文件到springboot项目-->
  123. <plugin>
  124. <groupId>org.apache.maven.plugins</groupId>
  125. <artifactId>maven-resources-plugin</artifactId>
  126. <version>3.1.0</version>
  127. <configuration>
  128. <!--配置不需要压缩的文件-->
  129. <nonFilteredFileExtensions>
  130. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  131. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  132. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  133. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  134. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  135. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  136. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  137. <nonFilteredFileExtension>mp3</nonFilteredFileExtension>
  138. <nonFilteredFileExtension>wav</nonFilteredFileExtension>
  139. <nonFilteredFileExtension>xlsx</nonFilteredFileExtension>
  140. <nonFilteredFileExtension>xls</nonFilteredFileExtension>
  141. </nonFilteredFileExtensions>
  142. <includeEmptyDirs>true</includeEmptyDirs>
  143. </configuration>
  144. <executions>
  145. <execution>
  146. <id>copy static</id>
  147. <phase>generate-resources</phase>
  148. <goals>
  149. <goal>copy-resources</goal>
  150. </goals>
  151. <configuration>
  152. <outputDirectory>${project.basedir}/src/main/resources/static</outputDirectory>
  153. <overwrite>true</overwrite>
  154. <resources>
  155. <resource>
  156. <!--因为vue-cli打包的目录在项目的根目录,所以从这里复制-->
  157. <directory>${project.basedir}/vpp-ui/dist/static</directory>
  158. <includes>
  159. <include>css/</include>
  160. <include>fonts/</include>
  161. <include>img/</include>
  162. <include>js/</include>
  163. </includes>
  164. </resource>
  165. <resource>
  166. <directory>${project.basedir}/vpp-ui/dist</directory>
  167. <includes>
  168. <include>favicon.ico</include>
  169. </includes>
  170. </resource>
  171. </resources>
  172. </configuration>
  173. </execution>
  174. <execution>
  175. <id>copy template</id>
  176. <phase>generate-resources</phase>
  177. <goals>
  178. <goal>copy-resources</goal>
  179. </goals>
  180. <configuration>
  181. <outputDirectory>${project.basedir}/src/main/resources/templates</outputDirectory>
  182. <overwrite>true</overwrite>
  183. <resources>
  184. <resource>
  185. <!--因为vue-cli打包的目录在项目的根目录,所以从这里复制-->
  186. <directory>${project.basedir}/vpp-ui/dist</directory>
  187. <includes>
  188. <include>index.html</include>
  189. <include>robots.txt</include>
  190. </includes>
  191. </resource>
  192. </resources>
  193. </configuration>
  194. </execution>
  195. </executions>
  196. </plugin>
  197. </plugins>
  198. </build>
  199. </project>