pom.xml 9.5 KB

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