pom.xml 8.8 KB

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