pom.xml 21 KB

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