pom.xml 20 KB

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