pom.xml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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>wps</artifactId>
  7. <groupId>com.jiayue</groupId>
  8. <version>1.0.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>wps-biz</artifactId>
  12. <description>
  13. wps-biz业务模块
  14. </description>
  15. <dependencies>
  16. <dependency>
  17. <groupId>com.alibaba</groupId>
  18. <artifactId>easyexcel</artifactId>
  19. <version>3.3.2</version>
  20. </dependency>
  21. <dependency>
  22. <groupId>com.baomidou</groupId>
  23. <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
  24. </dependency>
  25. <dependency>
  26. <groupId>com.taosdata.jdbc</groupId>
  27. <artifactId>taos-jdbcdriver</artifactId>
  28. <version>3.0.0</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>joda-time</groupId>
  32. <artifactId>joda-time</artifactId>
  33. <version>2.9.9</version>
  34. </dependency>
  35. <dependency>
  36. <groupId>com.sun.mail</groupId>
  37. <artifactId>javax.mail</artifactId>
  38. <version>1.5.4</version>
  39. </dependency>
  40. <!-- spring-boot-devtools -->
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-devtools</artifactId>
  44. <optional>true</optional> <!-- 表示依赖不会传递 -->
  45. </dependency>
  46. <!-- modbus-->
  47. <dependency>
  48. <groupId>wei.yigulu</groupId>
  49. <artifactId>protocol-modbus</artifactId>
  50. <version>1.2.11</version>
  51. </dependency>
  52. <!-- 系统服务-->
  53. <dependency>
  54. <groupId>com.jiayue</groupId>
  55. <artifactId>wps-system</artifactId>
  56. <version>1.0.0</version>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.commons</groupId>
  60. <artifactId>commons-math3</artifactId>
  61. <version>3.6.1</version>
  62. </dependency>
  63. </dependencies>
  64. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  65. <profile>
  66. <id>window</id>
  67. <properties>
  68. <npm>npm.cmd</npm>
  69. </properties>
  70. <activation>
  71. <activeByDefault>true</activeByDefault>
  72. </activation>
  73. </profile>
  74. <profile>
  75. <id>linux</id>
  76. <properties>
  77. <npm>npm</npm>
  78. </properties>
  79. </profile>
  80. </profiles>
  81. <build>
  82. <finalName>${project.artifactId}</finalName>
  83. <plugins>
  84. <!--跳过test类-->
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-surefire-plugin</artifactId>
  88. <version>2.21.0</version>
  89. <configuration>
  90. <skipTests>true</skipTests>
  91. </configuration>
  92. </plugin>
  93. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  94. <plugin>
  95. <groupId>org.apache.maven.plugins</groupId>
  96. <artifactId>maven-clean-plugin</artifactId>
  97. <version>3.1.0</version>
  98. <configuration>
  99. <filesets>
  100. <fileset>
  101. <!-- Vue项目打包自动生成的dist目录 -->
  102. <directory>../wps-ui/dist</directory>
  103. </fileset>
  104. <fileset>
  105. <!-- 最终项目打包自动生成的package目录 -->
  106. <directory>../package/wps/${project.version}</directory>
  107. </fileset>
  108. </filesets>
  109. </configuration>
  110. </plugin>
  111. <plugin>
  112. <groupId>org.codehaus.mojo</groupId>
  113. <artifactId>exec-maven-plugin</artifactId>
  114. <version>1.6.0</version>
  115. <executions>
  116. <execution>
  117. <id>exec-npm-install</id>
  118. <phase>validate</phase>
  119. <goals>
  120. <goal>exec</goal>
  121. </goals>
  122. <configuration>
  123. <executable>${npm}</executable>
  124. <arguments>
  125. <argument>install</argument>
  126. </arguments>
  127. <workingDirectory>../wps-ui</workingDirectory>
  128. </configuration>
  129. </execution>
  130. <execution>
  131. <id>exec-npm-run-build</id>
  132. <phase>generate-resources</phase>
  133. <goals>
  134. <goal>exec</goal>
  135. </goals>
  136. <configuration>
  137. <executable>${npm}</executable>
  138. <arguments>
  139. <argument>run</argument>
  140. <argument>build:prod</argument>
  141. </arguments>
  142. <workingDirectory>../wps-ui</workingDirectory>
  143. </configuration>
  144. </execution>
  145. </executions>
  146. </plugin>
  147. <plugin>
  148. <groupId>org.apache.maven.plugins</groupId>
  149. <artifactId>maven-resources-plugin</artifactId>
  150. <version>3.1.0</version>
  151. <configuration>
  152. <nonFilteredFileExtensions>
  153. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  154. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  155. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  156. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  157. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  158. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  159. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  160. </nonFilteredFileExtensions>
  161. <includeEmptyDirs>true</includeEmptyDirs>
  162. </configuration>
  163. <executions>
  164. <execution>
  165. <id>copy static</id>
  166. <phase>generate-resources</phase>
  167. <goals>
  168. <goal>copy-resources</goal>
  169. </goals>
  170. <configuration>
  171. <!-- 复制前端打包文件到这里 -->
  172. <outputDirectory>../package/wps/${project.version}/vue</outputDirectory>
  173. <overwrite>true</overwrite>
  174. <resources>
  175. <resource>
  176. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  177. <directory>../wps-ui</directory>
  178. <includes>
  179. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  180. <include>dist/</include>
  181. <include>nginx.conf</include>
  182. <include>index.html</include>
  183. <include>robots.txt</include>
  184. </includes>
  185. </resource>
  186. </resources>
  187. </configuration>
  188. </execution>
  189. </executions>
  190. </plugin>
  191. <plugin>
  192. <groupId>org.springframework.boot</groupId>
  193. <artifactId>spring-boot-maven-plugin</artifactId>
  194. <version>2.1.7.RELEASE</version>
  195. <configuration>
  196. <outputDirectory>../package/wps/${project.version}/java</outputDirectory>
  197. <!--控制是否启用支持Linux下service方式运行-->
  198. <executable>true</executable>
  199. <includeSystemScope>true</includeSystemScope>
  200. </configuration>
  201. <executions>
  202. <execution>
  203. <goals>
  204. <goal>build-info</goal>
  205. <goal>repackage</goal>
  206. </goals>
  207. </execution>
  208. </executions>
  209. </plugin>
  210. </plugins>
  211. </build>
  212. </project>