pom.xml 20 KB

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