pom.xml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.jiayue.ipfcst</groupId>
  6. <artifactId>ipfcst-console</artifactId>
  7. <version>3.3.1.znzx</version>
  8. <properties>
  9. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  10. <java.version>1.8</java.version>
  11. <ipfcst.version>3.0</ipfcst.version>
  12. <aviator.version>5.0.0</aviator.version>
  13. <fastjson.version>1.2.60</fastjson.version>
  14. <commons-dbcp2.version>2.5.0</commons-dbcp2.version>
  15. <jasypt-boot.version>2.1.1</jasypt-boot.version>
  16. <reflections.version>0.9.10</reflections.version>
  17. <rxtx.version>18.12.07</rxtx.version>
  18. <modbus4j.version>3.0.5</modbus4j.version>
  19. <commons.fileupload.version>1.3</commons.fileupload.version>
  20. <commons.net.version>3.3</commons.net.version>
  21. <velocity.version>1.7</velocity.version>
  22. <netty.version>4.1.22.Final</netty.version>
  23. <jodatime.version>2.9.9</jodatime.version>
  24. </properties>
  25. <dependencyManagement>
  26. <dependencies>
  27. <dependency>
  28. <groupId>com.jiayue.ipfcst</groupId>
  29. <artifactId>ipfcst</artifactId>
  30. <version>3.0.0</version>
  31. <type>pom</type>
  32. <scope>import</scope>
  33. </dependency>
  34. </dependencies>
  35. </dependencyManagement>
  36. <dependencies>
  37. <!--配置文件处理器-->
  38. <dependency>
  39. <groupId>org.springframework.boot</groupId>
  40. <artifactId>spring-boot-configuration-processor</artifactId>
  41. <optional>true</optional>
  42. </dependency>
  43. <!--jasypt配置文件加解密-->
  44. <dependency>
  45. <groupId>com.github.ulisesbocchio</groupId>
  46. <artifactId>jasypt-spring-boot-starter</artifactId>
  47. <version>${jasypt-boot.version}</version>
  48. </dependency>
  49. <!--Lombok-->
  50. <dependency>
  51. <groupId>org.projectlombok</groupId>
  52. <artifactId>lombok</artifactId>
  53. <scope>provided</scope>
  54. </dependency>
  55. <!--测试依赖-->
  56. <dependency>
  57. <groupId>org.springframework.boot</groupId>
  58. <artifactId>spring-boot-starter-test</artifactId>
  59. <scope>test</scope>
  60. </dependency>
  61. <dependency>
  62. <groupId>cn.hutool</groupId>
  63. <artifactId>hutool-all</artifactId>
  64. <version>5.3.5</version>
  65. </dependency>
  66. <dependency>
  67. <groupId>org.springframework</groupId>
  68. <artifactId>spring-mock</artifactId>
  69. <version>2.0.8</version>
  70. </dependency>
  71. <dependency>
  72. <groupId>com.jiayue.ipfcst</groupId>
  73. <artifactId>ipfcst-common-data</artifactId>
  74. <version>3.0.0</version>
  75. </dependency>
  76. <dependency>
  77. <groupId>com.jiayue.ipfcst</groupId>
  78. <artifactId>ipfcst-common-security</artifactId>
  79. <version>3.0.0</version>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.apache.commons</groupId>
  83. <artifactId>commons-dbcp2</artifactId>
  84. <version>${commons-dbcp2.version}</version>
  85. </dependency>
  86. <!-- https://mvnrepository.com/artifact/com.googlecode.aviator/aviator -->
  87. <dependency>
  88. <groupId>com.googlecode.aviator</groupId>
  89. <artifactId>aviator</artifactId>
  90. <version>${aviator.version}</version>
  91. </dependency>
  92. <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
  93. <dependency>
  94. <groupId>com.alibaba</groupId>
  95. <artifactId>fastjson</artifactId>
  96. <version>${fastjson.version}</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.reflections</groupId>
  100. <artifactId>reflections</artifactId>
  101. <version>${reflections.version}</version>
  102. <exclusions>
  103. <exclusion>
  104. <artifactId>javassist</artifactId>
  105. <groupId>org.javassist</groupId>
  106. </exclusion>
  107. </exclusions>
  108. </dependency>
  109. <dependency>
  110. <groupId>org.apache.commons</groupId>
  111. <artifactId>commons-lang3</artifactId>
  112. </dependency>
  113. <dependency>
  114. <groupId>net.sf.ehcache</groupId>
  115. <artifactId>ehcache</artifactId>
  116. </dependency>
  117. <dependency>
  118. <groupId>org.springframework.boot</groupId>
  119. <artifactId>spring-boot-starter-web</artifactId>
  120. </dependency>
  121. <dependency>
  122. <groupId>org.springframework.boot</groupId>
  123. <artifactId>spring-boot-starter-websocket</artifactId>
  124. </dependency>
  125. <dependency>
  126. <groupId>org.springframework.boot</groupId>
  127. <artifactId>spring-boot-starter-undertow</artifactId>
  128. </dependency>
  129. <dependency>
  130. <groupId>commons-fileupload</groupId>
  131. <artifactId>commons-fileupload</artifactId>
  132. <version>${commons.fileupload.version}</version>
  133. </dependency>
  134. <dependency>
  135. <groupId>org.apache.velocity</groupId>
  136. <artifactId>velocity</artifactId>
  137. <version>${velocity.version}</version>
  138. </dependency>
  139. <dependency>
  140. <groupId>io.netty</groupId>
  141. <artifactId>netty-all</artifactId>
  142. <version>${netty.version}</version>
  143. </dependency>
  144. <dependency>
  145. <groupId>joda-time</groupId>
  146. <artifactId>joda-time</artifactId>
  147. <version>${jodatime.version}</version>
  148. </dependency>
  149. <!--ftp上传下载依赖包-->
  150. <dependency>
  151. <groupId>commons-net</groupId>
  152. <artifactId>commons-net</artifactId>
  153. <version>${commons.net.version}</version>
  154. </dependency>
  155. <dependency>
  156. <groupId>org.springframework.boot</groupId>
  157. <artifactId>spring-boot-starter-aop</artifactId>
  158. </dependency>
  159. <dependency>
  160. <groupId>net.sourceforge.jexcelapi</groupId>
  161. <artifactId>jxl</artifactId>
  162. <version>2.6.10</version>
  163. </dependency>
  164. <!-- SSH安全连接所使用的类库 -->
  165. <dependency>
  166. <groupId>com.jcraft</groupId>
  167. <artifactId>jsch</artifactId>
  168. <version>0.1.55</version>
  169. <scope>compile</scope>
  170. <optional>true</optional>
  171. </dependency>
  172. <!--hutool的poi包 https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
  173. <dependency>
  174. <groupId>org.apache.poi</groupId>
  175. <artifactId>poi-ooxml</artifactId>
  176. <version>3.17</version>
  177. </dependency>
  178. <dependency>
  179. <groupId>com.google.zxing</groupId>
  180. <artifactId>core</artifactId>
  181. <version>3.3.3</version>
  182. </dependency>
  183. <!--
  184. <dependency>
  185. <groupId>org.apache.commons</groupId>
  186. <artifactId>commons-csv</artifactId>
  187. <version>1.7</version>
  188. </dependency>
  189. -->
  190. <dependency>
  191. <groupId>org.apache.commons</groupId>
  192. <artifactId>commons-compress</artifactId>
  193. <version>1.5</version>
  194. </dependency>
  195. </dependencies>
  196. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  197. <profile>
  198. <id>window</id>
  199. <properties>
  200. <npm>npm.cmd</npm>
  201. </properties>
  202. <activation>
  203. <activeByDefault>true</activeByDefault>
  204. </activation>
  205. </profile>
  206. <profile>
  207. <id>linux</id>
  208. <properties>
  209. <npm>npm</npm>
  210. </properties>
  211. </profile>
  212. </profiles>
  213. <build>
  214. <finalName>${project.artifactId}</finalName>
  215. <resources>
  216. <resource>
  217. <directory>src/main/resources</directory>
  218. <filtering>true</filtering>
  219. <excludes>
  220. <exclude>*.keystore</exclude>
  221. </excludes>
  222. </resource>
  223. <resource>
  224. <directory>src/main/resources</directory>
  225. <filtering>false</filtering>
  226. <includes>
  227. <include>*.keystore</include>
  228. </includes>
  229. </resource>
  230. </resources>
  231. <plugins>
  232. <plugin>
  233. <artifactId>maven-compiler-plugin</artifactId>
  234. <version>3.7.0</version>
  235. <configuration>
  236. <source>${java.version}</source>
  237. <target>${java.version}</target>
  238. <encoding>${project.build.sourceEncoding}</encoding>
  239. <!--<compilerArgs>-->
  240. <!--&lt;!&ndash; 过期的方法的警告&ndash;&gt;-->
  241. <!--<arg>-Xlint:deprecation</arg>-->
  242. <!--</compilerArgs>-->
  243. <compilerArguments>
  244. <!-- 是否输出所有的编译信息(包括类的加载等)-->
  245. <!--<verbose />-->
  246. <!-- 解决maven命令编译报错,因为rt.jar 和jce.jar在jre的lib下面,不在jdk的lib下面,
  247. 导致maven找不到(java7以后会出现这个问题),将这2个jar包拷贝到jdk的lib下面估计也好使-->
  248. <bootclasspath>${java.home}\lib\rt.jar;${java.home}\lib\jce.jar</bootclasspath>
  249. </compilerArguments>
  250. </configuration>
  251. </plugin>
  252. <!--跳过test类-->
  253. <plugin>
  254. <groupId>org.apache.maven.plugins</groupId>
  255. <artifactId>maven-surefire-plugin</artifactId>
  256. <version>2.21.0</version>
  257. <configuration>
  258. <skipTests>true</skipTests>
  259. </configuration>
  260. </plugin>
  261. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  262. <plugin>
  263. <groupId>org.apache.maven.plugins</groupId>
  264. <artifactId>maven-clean-plugin</artifactId>
  265. <version>3.1.0</version>
  266. <configuration>
  267. <filesets>
  268. <fileset>
  269. <!-- 前端资源目录,即:存放前端包目录-->
  270. <directory>src/main/resources/static</directory>
  271. </fileset>
  272. <fileset>
  273. <!-- Vue项目打包自动生成的dist目录 -->
  274. <directory>${basedir}/dist</directory>
  275. </fileset>
  276. </filesets>
  277. </configuration>
  278. </plugin>
  279. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  280. <!--拷贝依赖jar文件到ipfcst-lib目录下-->
  281. <plugin>
  282. <groupId>org.apache.maven.plugins</groupId>
  283. <artifactId>maven-dependency-plugin</artifactId>
  284. <version>2.10</version>
  285. <executions>
  286. <execution>
  287. <id>copy-dependencies</id>
  288. <phase>package</phase>
  289. <goals>
  290. <goal>copy-dependencies</goal>
  291. </goals>
  292. <configuration>
  293. <excludeArtifactIds>ipfcst-common-data,ipfcst-common-security,ipfcst-common-core,protocol-iec104,protocol-modbus,protocol-cdt,protocol-core,protocol-all</excludeArtifactIds>
  294. <outputDirectory>../syjy/ipfcstV3/ipfcst-lib</outputDirectory>
  295. </configuration>
  296. </execution>
  297. </executions>
  298. </plugin>
  299. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  300. <plugin>
  301. <groupId>org.codehaus.mojo</groupId>
  302. <artifactId>exec-maven-plugin</artifactId>
  303. <version>1.6.0</version>
  304. <executions>
  305. <execution>
  306. <id>exec-npm-install</id>
  307. <phase>validate</phase>
  308. <goals>
  309. <goal>exec</goal>
  310. </goals>
  311. <configuration>
  312. <executable>${npm}</executable>
  313. <arguments>
  314. <argument>install</argument>
  315. </arguments>
  316. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  317. </configuration>
  318. </execution>
  319. <execution>
  320. <id>exec-npm-run-build</id>
  321. <phase>generate-resources</phase>
  322. <goals>
  323. <goal>exec</goal>
  324. </goals>
  325. <configuration>
  326. <executable>${npm}</executable>
  327. <arguments>
  328. <argument>run</argument>
  329. <argument>build:prod</argument>
  330. </arguments>
  331. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  332. </configuration>
  333. </execution>
  334. <execution>
  335. <phase>package</phase>
  336. <goals>
  337. <goal>java</goal>
  338. </goals>
  339. <configuration>
  340. <mainClass>com.jiayue.ipfcst.console.util.CreateConsoleSh</mainClass>
  341. <arguments>
  342. <argument>${project.version}</argument>
  343. </arguments>
  344. </configuration>
  345. </execution>
  346. </executions>
  347. </plugin>
  348. <plugin>
  349. <groupId>org.apache.maven.plugins</groupId>
  350. <artifactId>maven-resources-plugin</artifactId>
  351. <version>3.1.0</version>
  352. <configuration>
  353. <nonFilteredFileExtensions>
  354. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  355. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  356. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  357. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  358. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  359. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  360. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  361. </nonFilteredFileExtensions>
  362. <includeEmptyDirs>true</includeEmptyDirs>
  363. </configuration>
  364. <executions>
  365. <execution>
  366. <id>copy config</id>
  367. <phase>package</phase>
  368. <goals>
  369. <goal>copy-resources</goal>
  370. </goals>
  371. <configuration>
  372. <resources>
  373. <resource>
  374. <directory>src/main/resources</directory>
  375. <includes>
  376. <include>application.yml</include>
  377. <include>vms/**</include>
  378. </includes>
  379. </resource>
  380. </resources>
  381. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  382. </configuration>
  383. </execution>
  384. <execution>
  385. <id>copy static</id>
  386. <phase>generate-resources</phase>
  387. <goals>
  388. <goal>copy-resources</goal>
  389. </goals>
  390. <configuration>
  391. <!-- 复制前端打包文件到这里 -->
  392. <outputDirectory>src/main/resources/static</outputDirectory>
  393. <overwrite>true</overwrite>
  394. <resources>
  395. <resource>
  396. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  397. <directory>${basedir}/dist</directory>
  398. <includes>
  399. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  400. <include>assets/</include>
  401. <include>favicon.ico</include>
  402. <include>index.html</include>
  403. </includes>
  404. </resource>
  405. </resources>
  406. </configuration>
  407. </execution>
  408. <execution>
  409. <id>copy-start-console.sh</id>
  410. <!-- here the phase you need -->
  411. <phase>compile</phase>
  412. <goals>
  413. <goal>copy-resources</goal>
  414. </goals>
  415. <configuration>
  416. <outputDirectory>../syjy/ipfcstV3/bin</outputDirectory>
  417. <resources>
  418. <resource>
  419. <directory>target/classes</directory>
  420. <includes>
  421. <include>start-console.sh</include>
  422. </includes>
  423. </resource>
  424. </resources>
  425. </configuration>
  426. </execution>
  427. </executions>
  428. </plugin>
  429. <plugin>
  430. <groupId>org.apache.maven.plugins</groupId>
  431. <artifactId>maven-jar-plugin</artifactId>
  432. <version>2.6</version>
  433. <configuration>
  434. <excludes>
  435. <exclude>application.yml</exclude>
  436. <exclude>logback-console.xml</exclude>
  437. </excludes>
  438. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  439. <archive>
  440. <manifest>
  441. <addClasspath>true</addClasspath>
  442. <classpathPrefix>/home/syjy/ipfcstV3/ipfcst-lib/</classpathPrefix>
  443. <mainClass>com.jiayue.ipfcst.ConsoleApplication</mainClass>
  444. </manifest>
  445. <!-- 用maven在MANIFEST.MF资料中的Class-Path中增加当前目录(.) -->
  446. <manifestEntries>
  447. <Class-Path>/home/syjy/ipfcstV3/ipfcst-lib</Class-Path>
  448. </manifestEntries>
  449. </archive>
  450. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  451. </configuration>
  452. </plugin>
  453. <plugin>
  454. <groupId>org.springframework.boot</groupId>
  455. <artifactId>spring-boot-maven-plugin</artifactId>
  456. <version>2.1.7.RELEASE</version>
  457. <configuration>
  458. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  459. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  460. <includes>
  461. <include>
  462. <groupId>nothing</groupId>
  463. <artifactId>nothing</artifactId>
  464. </include>
  465. <include>
  466. <groupId>com.jiayue.ipfcst</groupId>
  467. <artifactId>ipfcst-common-data</artifactId>
  468. </include>
  469. <include>
  470. <groupId>com.jiayue.ipfcst</groupId>
  471. <artifactId>ipfcst-common-security</artifactId>
  472. </include>
  473. <include>
  474. <groupId>com.jiayue.ipfcst</groupId>
  475. <artifactId>ipfcst-common-core</artifactId>
  476. </include>
  477. <include>
  478. <groupId>wei.yigulu</groupId>
  479. <artifactId>protocol-iec104</artifactId>
  480. </include>
  481. <include>
  482. <groupId>wei.yigulu</groupId>
  483. <artifactId>protocol-modbus</artifactId>
  484. </include>
  485. <include>
  486. <groupId>wei.yigulu</groupId>
  487. <artifactId>protocol-cdt</artifactId>
  488. </include>
  489. <include>
  490. <groupId>wei.yigulu</groupId>
  491. <artifactId>protocol-core</artifactId>
  492. </include>
  493. <include>
  494. <groupId>wei.yigulu</groupId>
  495. <artifactId>protocol-all</artifactId>
  496. </include>
  497. </includes>
  498. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  499. <!--控制是否启用支持Linux下service方式运行-->
  500. <executable>false</executable>
  501. </configuration>
  502. <executions>
  503. <execution>
  504. <goals>
  505. <goal>build-info</goal>
  506. <goal>repackage</goal>
  507. </goals>
  508. </execution>
  509. </executions>
  510. </plugin>
  511. <plugin>
  512. <artifactId>maven-assembly-plugin</artifactId>
  513. <version>2.2.1</version>
  514. <configuration>
  515. <!-- 定义压缩包存放位置 -->
  516. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  517. <!-- 定义压缩包文件名 -->
  518. <finalName>${project.artifactId}-${project.version}</finalName>
  519. <appendAssemblyId>false</appendAssemblyId>
  520. <descriptors>
  521. <descriptor>src/main/resources/assembly_base.xml</descriptor>
  522. </descriptors>
  523. </configuration>
  524. <executions>
  525. <execution>
  526. <id>make-assembly</id>
  527. <phase>package</phase>
  528. <goals>
  529. <goal>single</goal>
  530. </goals>
  531. </execution>
  532. </executions>
  533. </plugin>
  534. </plugins>
  535. </build>
  536. </project>