pom.xml 9.1 KB

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