pom.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  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. </dependencies>
  221. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  222. <profile>
  223. <id>window</id>
  224. <properties>
  225. <npm>npm.cmd</npm>
  226. </properties>
  227. <activation>
  228. <activeByDefault>true</activeByDefault>
  229. </activation>
  230. </profile>
  231. <profile>
  232. <id>linux</id>
  233. <properties>
  234. <npm>npm</npm>
  235. </properties>
  236. </profile>
  237. </profiles>
  238. <build>
  239. <finalName>${project.artifactId}</finalName>
  240. <resources>
  241. <resource>
  242. <directory>src/main/resources</directory>
  243. <filtering>true</filtering>
  244. <excludes>
  245. <exclude>*.keystore</exclude>
  246. </excludes>
  247. </resource>
  248. <resource>
  249. <directory>src/main/resources</directory>
  250. <filtering>false</filtering>
  251. <includes>
  252. <include>*.keystore</include>
  253. </includes>
  254. </resource>
  255. </resources>
  256. <plugins>
  257. <plugin>
  258. <artifactId>maven-compiler-plugin</artifactId>
  259. <version>3.7.0</version>
  260. <configuration>
  261. <source>${java.version}</source>
  262. <target>${java.version}</target>
  263. <encoding>${project.build.sourceEncoding}</encoding>
  264. <!--<compilerArgs>-->
  265. <!--&lt;!&ndash; 过期的方法的警告&ndash;&gt;-->
  266. <!--<arg>-Xlint:deprecation</arg>-->
  267. <!--</compilerArgs>-->
  268. <compilerArguments>
  269. <!-- 是否输出所有的编译信息(包括类的加载等)-->
  270. <!--<verbose />-->
  271. <!-- 解决maven命令编译报错,因为rt.jar 和jce.jar在jre的lib下面,不在jdk的lib下面,
  272. 导致maven找不到(java7以后会出现这个问题),将这2个jar包拷贝到jdk的lib下面估计也好使-->
  273. <bootclasspath>${java.home}\lib\rt.jar;${java.home}\lib\jce.jar</bootclasspath>
  274. </compilerArguments>
  275. </configuration>
  276. </plugin>
  277. <!--跳过test类-->
  278. <plugin>
  279. <groupId>org.apache.maven.plugins</groupId>
  280. <artifactId>maven-surefire-plugin</artifactId>
  281. <version>2.21.0</version>
  282. <configuration>
  283. <skipTests>true</skipTests>
  284. </configuration>
  285. </plugin>
  286. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  287. <plugin>
  288. <groupId>org.apache.maven.plugins</groupId>
  289. <artifactId>maven-clean-plugin</artifactId>
  290. <version>3.1.0</version>
  291. <configuration>
  292. <filesets>
  293. <fileset>
  294. <!-- 前端资源目录,即:存放前端包目录-->
  295. <directory>src/main/resources/static</directory>
  296. </fileset>
  297. <fileset>
  298. <!-- Vue项目打包自动生成的dist目录 -->
  299. <directory>${basedir}/dist</directory>
  300. </fileset>
  301. </filesets>
  302. </configuration>
  303. </plugin>
  304. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  305. <!--拷贝依赖jar文件到ipfcst-lib目录下-->
  306. <plugin>
  307. <groupId>org.apache.maven.plugins</groupId>
  308. <artifactId>maven-dependency-plugin</artifactId>
  309. <version>2.10</version>
  310. <executions>
  311. <execution>
  312. <id>copy-dependencies</id>
  313. <phase>package</phase>
  314. <goals>
  315. <goal>copy-dependencies</goal>
  316. </goals>
  317. <configuration>
  318. <excludeArtifactIds>ipfcst-common-data,ipfcst-common-security,ipfcst-common-core,protocol-iec104,protocol-modbus,protocol-cdt,protocol-core,protocol-all</excludeArtifactIds>
  319. <outputDirectory>../syjy/ipfcstV3/ipfcst-lib</outputDirectory>
  320. </configuration>
  321. </execution>
  322. </executions>
  323. </plugin>
  324. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  325. <plugin>
  326. <groupId>org.codehaus.mojo</groupId>
  327. <artifactId>exec-maven-plugin</artifactId>
  328. <version>1.6.0</version>
  329. <executions>
  330. <execution>
  331. <id>exec-npm-install</id>
  332. <phase>validate</phase>
  333. <goals>
  334. <goal>exec</goal>
  335. </goals>
  336. <configuration>
  337. <executable>${npm}</executable>
  338. <arguments>
  339. <argument>install</argument>
  340. </arguments>
  341. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  342. </configuration>
  343. </execution>
  344. <execution>
  345. <id>exec-npm-run-build</id>
  346. <phase>generate-resources</phase>
  347. <goals>
  348. <goal>exec</goal>
  349. </goals>
  350. <configuration>
  351. <executable>${npm}</executable>
  352. <arguments>
  353. <argument>run</argument>
  354. <argument>build:prod</argument>
  355. </arguments>
  356. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  357. </configuration>
  358. </execution>
  359. <execution>
  360. <phase>package</phase>
  361. <goals>
  362. <goal>java</goal>
  363. </goals>
  364. <configuration>
  365. <mainClass>com.jiayue.ipfcst.console.util.CreateConsoleSh</mainClass>
  366. <arguments>
  367. <argument>${project.version}</argument>
  368. </arguments>
  369. </configuration>
  370. </execution>
  371. </executions>
  372. </plugin>
  373. <plugin>
  374. <groupId>org.apache.maven.plugins</groupId>
  375. <artifactId>maven-resources-plugin</artifactId>
  376. <version>3.1.0</version>
  377. <configuration>
  378. <nonFilteredFileExtensions>
  379. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  380. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  381. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  382. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  383. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  384. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  385. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  386. </nonFilteredFileExtensions>
  387. <includeEmptyDirs>true</includeEmptyDirs>
  388. </configuration>
  389. <executions>
  390. <execution>
  391. <id>copy config</id>
  392. <phase>package</phase>
  393. <goals>
  394. <goal>copy-resources</goal>
  395. </goals>
  396. <configuration>
  397. <resources>
  398. <resource>
  399. <directory>src/main/resources</directory>
  400. <includes>
  401. <include>application.yml</include>
  402. <include>vms/**</include>
  403. </includes>
  404. </resource>
  405. </resources>
  406. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  407. </configuration>
  408. </execution>
  409. <execution>
  410. <id>copy static</id>
  411. <phase>generate-resources</phase>
  412. <goals>
  413. <goal>copy-resources</goal>
  414. </goals>
  415. <configuration>
  416. <!-- 复制前端打包文件到这里 -->
  417. <outputDirectory>src/main/resources/static</outputDirectory>
  418. <overwrite>true</overwrite>
  419. <resources>
  420. <resource>
  421. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  422. <directory>${basedir}/dist</directory>
  423. <includes>
  424. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  425. <include>assets/</include>
  426. <include>favicon.ico</include>
  427. <include>index.html</include>
  428. </includes>
  429. </resource>
  430. </resources>
  431. </configuration>
  432. </execution>
  433. <execution>
  434. <id>copy-start-console.sh</id>
  435. <!-- here the phase you need -->
  436. <phase>compile</phase>
  437. <goals>
  438. <goal>copy-resources</goal>
  439. </goals>
  440. <configuration>
  441. <outputDirectory>../syjy/ipfcstV3/bin</outputDirectory>
  442. <resources>
  443. <resource>
  444. <directory>target/classes</directory>
  445. <includes>
  446. <include>start-console.sh</include>
  447. </includes>
  448. </resource>
  449. </resources>
  450. </configuration>
  451. </execution>
  452. </executions>
  453. </plugin>
  454. <plugin>
  455. <groupId>org.apache.maven.plugins</groupId>
  456. <artifactId>maven-jar-plugin</artifactId>
  457. <version>2.6</version>
  458. <configuration>
  459. <!--不打入jar包的文件类型或者路径-->
  460. <excludes>
  461. <exclude>application.yml</exclude>
  462. <exclude>logback-console.xml</exclude>
  463. </excludes>
  464. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  465. <archive>
  466. <manifest>
  467. <addClasspath>true</addClasspath>
  468. <classpathPrefix>/home/syjy/ipfcstV3/ipfcst-lib/</classpathPrefix>
  469. <mainClass>com.jiayue.ipfcst.ConsoleApplication</mainClass>
  470. </manifest>
  471. <!-- 用maven在MANIFEST.MF资料中的Class-Path中增加当前目录(.) -->
  472. <manifestEntries>
  473. <Class-Path>/home/syjy/ipfcstV3/ipfcst-lib</Class-Path>
  474. </manifestEntries>
  475. </archive>
  476. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  477. </configuration>
  478. </plugin>
  479. <plugin>
  480. <groupId>org.springframework.boot</groupId>
  481. <artifactId>spring-boot-maven-plugin</artifactId>
  482. <version>2.1.7.RELEASE</version>
  483. <configuration>
  484. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  485. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  486. <includes>
  487. <include>
  488. <groupId>nothing</groupId>
  489. <artifactId>nothing</artifactId>
  490. </include>
  491. <include>
  492. <groupId>com.jiayue.focus</groupId>
  493. <artifactId>ipfcst-common-data</artifactId>
  494. </include>
  495. <include>
  496. <groupId>com.jiayue.focus</groupId>
  497. <artifactId>ipfcst-common-security</artifactId>
  498. </include>
  499. <include>
  500. <groupId>com.jiayue.focus</groupId>
  501. <artifactId>ipfcst-common-core</artifactId>
  502. </include>
  503. </includes>
  504. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  505. <!--控制是否启用支持Linux下service方式运行-->
  506. <executable>false</executable>
  507. </configuration>
  508. <executions>
  509. <execution>
  510. <goals>
  511. <goal>build-info</goal>
  512. <goal>repackage</goal>
  513. </goals>
  514. </execution>
  515. </executions>
  516. </plugin>
  517. <plugin>
  518. <artifactId>maven-assembly-plugin</artifactId>
  519. <version>2.2.1</version>
  520. <configuration>
  521. <!-- 定义压缩包存放位置 -->
  522. <outputDirectory>../syjy/ipfcstV3/produce/console/${project.version}</outputDirectory>
  523. <!-- 定义压缩包文件名 -->
  524. <finalName>${project.artifactId}-${project.version}</finalName>
  525. <appendAssemblyId>false</appendAssemblyId>
  526. <descriptors>
  527. <descriptor>src/main/resources/assembly_base.xml</descriptor>
  528. </descriptors>
  529. </configuration>
  530. <executions>
  531. <execution>
  532. <id>make-assembly</id>
  533. <phase>package</phase>
  534. <goals>
  535. <goal>single</goal>
  536. </goals>
  537. </execution>
  538. </executions>
  539. </plugin>
  540. </plugins>
  541. </build>
  542. <!--上传配置 必须 -->
  543. <distributionManagement>
  544. <repository>
  545. <id>jiayue-releases</id>
  546. <url>http://49.4.68.219:8888/nexus/content/repositories/jiayue-releases</url>
  547. </repository>
  548. <snapshotRepository>
  549. <id>jiayue-snapshots</id>
  550. <url>http://49.4.68.219:8888/nexus/content/repositories/jiayue-snapshots</url>
  551. </snapshotRepository>
  552. </distributionManagement>
  553. </project>