pom.xml 20 KB

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