pom.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.jiayue.ipfcst</groupId>
  7. <artifactId>ipfcst-reportquery</artifactId>
  8. <!--改版本号时注意第2位的大小包:0大包 1小包 3辽宁龙阜定制版(从3.1.276.m分支出来)lf龙阜-->
  9. <version>3.3.1.znzx</version>
  10. <properties>
  11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12. <java.version>1.8</java.version>
  13. <ipfcst.version>3.0</ipfcst.version>
  14. <jasypt-boot.version>2.1.1</jasypt-boot.version>
  15. <commons.fileupload.version>1.3</commons.fileupload.version>
  16. <commons.net.version>3.3</commons.net.version>
  17. <velocity.version>1.7</velocity.version>
  18. <jodatime.version>2.9.9</jodatime.version>
  19. </properties>
  20. <dependencies>
  21. <dependency>
  22. <groupId>com.jiayue.ipfcst</groupId>
  23. <artifactId>ipfcst-common-data</artifactId>
  24. <version>3.0.0</version>
  25. </dependency>
  26. <dependency>
  27. <groupId>com.jiayue.ipfcst</groupId>
  28. <artifactId>ipfcst-common-security</artifactId>
  29. <version>3.0.0</version>
  30. </dependency>
  31. <dependency>
  32. <groupId>cn.hutool</groupId>
  33. <artifactId>hutool-all</artifactId>
  34. <version>5.3.5</version>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.apache.poi</groupId>
  38. <artifactId>poi-ooxml</artifactId>
  39. <version>3.17</version>
  40. </dependency>
  41. <!--配置文件处理器-->
  42. <dependency>
  43. <groupId>org.springframework.boot</groupId>
  44. <artifactId>spring-boot-configuration-processor</artifactId>
  45. <optional>true</optional>
  46. </dependency>
  47. <!--jasypt配置文件加解密-->
  48. <dependency>
  49. <groupId>com.github.ulisesbocchio</groupId>
  50. <artifactId>jasypt-spring-boot-starter</artifactId>
  51. <version>${jasypt-boot.version}</version>
  52. </dependency>
  53. <!--Lombok-->
  54. <!--测试依赖-->
  55. <dependency>
  56. <groupId>org.projectlombok</groupId>
  57. <artifactId>lombok</artifactId>
  58. <scope>provided</scope>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-starter-test</artifactId>
  63. <scope>test</scope>
  64. <exclusions>
  65. <exclusion>
  66. <groupId>org.apache.logging.log4j</groupId>
  67. <artifactId>log4j-to-slf4j</artifactId>
  68. </exclusion>
  69. <exclusion>
  70. <groupId>org.apache.logging.log4j</groupId>
  71. <artifactId>log4j-api</artifactId>
  72. </exclusion>
  73. </exclusions>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.apache.logging.log4j</groupId>
  77. <artifactId>log4j-to-slf4j</artifactId>
  78. <version>2.12.4</version>
  79. </dependency>
  80. <dependency>
  81. <groupId>org.apache.logging.log4j</groupId>
  82. <artifactId>log4j-api</artifactId>
  83. <version>2.12.4</version>
  84. </dependency>
  85. <dependency>
  86. <groupId>net.sf.ehcache</groupId>
  87. <artifactId>ehcache</artifactId>
  88. </dependency>
  89. <dependency>
  90. <groupId>org.springframework.boot</groupId>
  91. <artifactId>spring-boot-starter-web</artifactId>
  92. </dependency>
  93. <dependency>
  94. <groupId>org.springframework.boot</groupId>
  95. <artifactId>spring-boot-starter-undertow</artifactId>
  96. </dependency>
  97. <dependency>
  98. <groupId>commons-fileupload</groupId>
  99. <artifactId>commons-fileupload</artifactId>
  100. <version>${commons.fileupload.version}</version>
  101. </dependency>
  102. <dependency>
  103. <groupId>org.apache.velocity</groupId>
  104. <artifactId>velocity</artifactId>
  105. <version>${velocity.version}</version>
  106. </dependency>
  107. <dependency>
  108. <groupId>joda-time</groupId>
  109. <artifactId>joda-time</artifactId>
  110. <version>${jodatime.version}</version>
  111. </dependency>
  112. <!--ftp上传下载依赖包-->
  113. <dependency>
  114. <groupId>commons-net</groupId>
  115. <artifactId>commons-net</artifactId>
  116. <version>${commons.net.version}</version>
  117. </dependency>
  118. <dependency>
  119. <groupId>com.google.zxing</groupId>
  120. <artifactId>core</artifactId>
  121. <version>3.3.3</version>
  122. </dependency>
  123. </dependencies>
  124. <dependencyManagement>
  125. <dependencies>
  126. <dependency>
  127. <groupId>com.jiayue.ipfcst</groupId>
  128. <artifactId>ipfcst</artifactId>
  129. <version>3.0.0</version>
  130. <type>pom</type>
  131. <scope>import</scope>
  132. </dependency>
  133. </dependencies>
  134. </dependencyManagement>
  135. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  136. <profile>
  137. <id>window</id>
  138. <properties>
  139. <npm>npm.cmd</npm>
  140. </properties>
  141. <activation>
  142. <activeByDefault>true</activeByDefault>
  143. </activation>
  144. </profile>
  145. <profile>
  146. <id>linux</id>
  147. <properties>
  148. <npm>npm</npm>
  149. </properties>
  150. </profile>
  151. </profiles>
  152. <build>
  153. <finalName>${project.artifactId}</finalName>
  154. <resources>
  155. <resource>
  156. <directory>src/main/resources</directory>
  157. <filtering>true</filtering>
  158. <excludes>
  159. <exclude>*.keystore</exclude>
  160. </excludes>
  161. </resource>
  162. <resource>
  163. <directory>src/main/resources</directory>
  164. <filtering>false</filtering>
  165. <includes>
  166. <include>*.keystore</include>
  167. </includes>
  168. </resource>
  169. </resources>
  170. <plugins>
  171. <plugin>
  172. <artifactId>maven-compiler-plugin</artifactId>
  173. <version>3.7.0</version>
  174. <configuration>
  175. <source>${java.version}</source>
  176. <target>${java.version}</target>
  177. <encoding>${project.build.sourceEncoding}</encoding>
  178. <!--<compilerArgs>-->
  179. <!--&lt;!&ndash; 过期的方法的警告&ndash;&gt;-->
  180. <!--<arg>-Xlint:deprecation</arg>-->
  181. <!--</compilerArgs>-->
  182. <compilerArguments>
  183. <!-- 是否输出所有的编译信息(包括类的加载等)-->
  184. <!--<verbose />-->
  185. <!-- 解决maven命令编译报错,因为rt.jar 和jce.jar在jre的lib下面,不在jdk的lib下面,
  186. 导致maven找不到(java7以后会出现这个问题),将这2个jar包拷贝到jdk的lib下面估计也好使-->
  187. <bootclasspath>${java.home}\lib\rt.jar;${java.home}\lib\jce.jar</bootclasspath>
  188. </compilerArguments>
  189. </configuration>
  190. </plugin>
  191. <!--跳过test类-->
  192. <plugin>
  193. <groupId>org.apache.maven.plugins</groupId>
  194. <artifactId>maven-surefire-plugin</artifactId>
  195. <version>2.21.0</version>
  196. <configuration>
  197. <skipTests>true</skipTests>
  198. </configuration>
  199. </plugin>
  200. <!-- 插件maven-clean-plugin,用于在编译前,清除之前编译的文件、文件夹等,避免残留之前的内容 -->
  201. <plugin>
  202. <groupId>org.apache.maven.plugins</groupId>
  203. <artifactId>maven-clean-plugin</artifactId>
  204. <version>3.1.0</version>
  205. <configuration>
  206. <filesets>
  207. <fileset>
  208. <!-- 前端资源目录,即:存放前端包目录-->
  209. <directory>src/main/resources/static</directory>
  210. </fileset>
  211. <fileset>
  212. <!-- Vue项目打包自动生成的dist目录 -->
  213. <directory>${basedir}/dist</directory>
  214. </fileset>
  215. </filesets>
  216. </configuration>
  217. </plugin>
  218. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  219. <!--拷贝依赖jar文件到ipfcst-lib目录下-->
  220. <plugin>
  221. <groupId>org.apache.maven.plugins</groupId>
  222. <artifactId>maven-dependency-plugin</artifactId>
  223. <version>2.10</version>
  224. <executions>
  225. <execution>
  226. <id>copy-dependencies</id>
  227. <phase>package</phase>
  228. <goals>
  229. <goal>copy-dependencies</goal>
  230. </goals>
  231. <configuration>
  232. <excludeArtifactIds>
  233. ipfcst-common-data,ipfcst-common-security,ipfcst-common-core,protocol-iec104,protocol-modbus,protocol-cdt,protocol-core,protocol-all
  234. </excludeArtifactIds>
  235. <outputDirectory>../syjy/ipfcstV3/ipfcst-lib</outputDirectory>
  236. </configuration>
  237. </execution>
  238. </executions>
  239. </plugin>
  240. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  241. <plugin>
  242. <groupId>org.codehaus.mojo</groupId>
  243. <artifactId>exec-maven-plugin</artifactId>
  244. <version>1.6.0</version>
  245. <executions>
  246. <execution>
  247. <id>exec-npm-install</id>
  248. <phase>validate</phase>
  249. <goals>
  250. <goal>exec</goal>
  251. </goals>
  252. <configuration>
  253. <executable>${npm}</executable>
  254. <arguments>
  255. <argument>install</argument>
  256. </arguments>
  257. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  258. </configuration>
  259. </execution>
  260. <execution>
  261. <id>exec-npm-run-build</id>
  262. <phase>generate-resources</phase>
  263. <goals>
  264. <goal>exec</goal>
  265. </goals>
  266. <configuration>
  267. <executable>${npm}</executable>
  268. <arguments>
  269. <argument>run</argument>
  270. <argument>build:prod</argument>
  271. </arguments>
  272. <workingDirectory>${basedir}/src/main/frontend</workingDirectory>
  273. </configuration>
  274. </execution>
  275. <execution>
  276. <phase>package</phase>
  277. <goals>
  278. <goal>java</goal>
  279. </goals>
  280. <configuration>
  281. <mainClass>com.jiayue.ipfcst.util.CreateReportquerySh</mainClass>
  282. <arguments>
  283. <argument>${project.version}</argument>
  284. </arguments>
  285. </configuration>
  286. </execution>
  287. </executions>
  288. </plugin>
  289. <plugin>
  290. <groupId>org.apache.maven.plugins</groupId>
  291. <artifactId>maven-resources-plugin</artifactId>
  292. <version>3.1.0</version>
  293. <configuration>
  294. <nonFilteredFileExtensions>
  295. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  296. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  297. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  298. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  299. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  300. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  301. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  302. <nonFilteredFileExtension>mp3</nonFilteredFileExtension>
  303. </nonFilteredFileExtensions>
  304. <includeEmptyDirs>true</includeEmptyDirs>
  305. </configuration>
  306. <executions>
  307. <execution>
  308. <id>copy config</id>
  309. <phase>package</phase>
  310. <goals>
  311. <goal>copy-resources</goal>
  312. </goals>
  313. <configuration>
  314. <resources>
  315. <resource>
  316. <directory>src/main/resources</directory>
  317. <includes>
  318. <include>application.yml</include>
  319. </includes>
  320. </resource>
  321. </resources>
  322. <outputDirectory>../syjy/ipfcstV3/produce/reportquery/${project.version}</outputDirectory>
  323. </configuration>
  324. </execution>
  325. <execution>
  326. <id>copy static</id>
  327. <phase>generate-resources</phase>
  328. <goals>
  329. <goal>copy-resources</goal>
  330. </goals>
  331. <configuration>
  332. <!-- 复制前端打包文件到这里 -->
  333. <outputDirectory>src/main/resources/static</outputDirectory>
  334. <overwrite>true</overwrite>
  335. <resources>
  336. <resource>
  337. <!-- 从前端打包的目录dist进行指定文件、文件夹内容的复制-->
  338. <directory>${basedir}/dist</directory>
  339. <includes>
  340. <!-- 具体根据实际前端代码、及目录结构进行配置-->
  341. <include>assets/</include>
  342. <include>favicon.ico</include>
  343. <include>index.html</include>
  344. <include>audio/</include>
  345. </includes>
  346. </resource>
  347. </resources>
  348. </configuration>
  349. </execution>
  350. </executions>
  351. </plugin>
  352. <plugin>
  353. <groupId>org.apache.maven.plugins</groupId>
  354. <artifactId>maven-jar-plugin</artifactId>
  355. <version>2.6</version>
  356. <configuration>
  357. <!--不打入jar包的文件类型或者路径-->
  358. <excludes>
  359. <exclude>application.yml</exclude>
  360. <exclude>logback-reportquery.xml</exclude>
  361. </excludes>
  362. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  363. <archive>
  364. <manifest>
  365. <addClasspath>true</addClasspath>
  366. <classpathPrefix>/home/syjy/ipfcstV3/ipfcst-lib/</classpathPrefix>
  367. <mainClass>com.jiayue.ipfcst.ReportQueryApplication</mainClass>
  368. </manifest>
  369. <!-- 用maven在MANIFEST.MF资料中的Class-Path中增加当前目录(.) -->
  370. <manifestEntries>
  371. <Class-Path>/home/syjy/ipfcstV3/ipfcst-lib</Class-Path>
  372. </manifestEntries>
  373. </archive>
  374. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  375. </configuration>
  376. </plugin>
  377. <plugin>
  378. <groupId>org.springframework.boot</groupId>
  379. <artifactId>spring-boot-maven-plugin</artifactId>
  380. <version>2.1.7.RELEASE</version>
  381. <configuration>
  382. <outputDirectory>../syjy/ipfcstV3/produce/reportquery/${project.version}</outputDirectory>
  383. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  384. <includes>
  385. <include>
  386. <groupId>nothing</groupId>
  387. <artifactId>nothing</artifactId>
  388. </include>
  389. <include>
  390. <groupId>com.jiayue.ipfcst</groupId>
  391. <artifactId>ipfcst-common-data</artifactId>
  392. </include>
  393. <include>
  394. <groupId>com.jiayue.ipfcst</groupId>
  395. <artifactId>ipfcst-common-security</artifactId>
  396. </include>
  397. <include>
  398. <groupId>com.jiayue.ipfcst</groupId>
  399. <artifactId>ipfcst-common-core</artifactId>
  400. </include>
  401. <include>
  402. <groupId>wei.yigulu</groupId>
  403. <artifactId>protocol-iec104</artifactId>
  404. </include>
  405. <include>
  406. <groupId>wei.yigulu</groupId>
  407. <artifactId>protocol-modbus</artifactId>
  408. </include>
  409. <include>
  410. <groupId>wei.yigulu</groupId>
  411. <artifactId>protocol-cdt</artifactId>
  412. </include>
  413. <include>
  414. <groupId>wei.yigulu</groupId>
  415. <artifactId>protocol-core</artifactId>
  416. </include>
  417. <include>
  418. <groupId>wei.yigulu</groupId>
  419. <artifactId>protocol-all</artifactId>
  420. </include>
  421. </includes>
  422. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  423. <!--控制是否启用支持Linux下service方式运行-->
  424. <executable>false</executable>
  425. </configuration>
  426. <executions>
  427. <execution>
  428. <goals>
  429. <goal>build-info</goal>
  430. <goal>repackage</goal>
  431. </goals>
  432. </execution>
  433. </executions>
  434. </plugin>
  435. <plugin>
  436. <artifactId>maven-assembly-plugin</artifactId>
  437. <version>2.2.1</version>
  438. <configuration>
  439. <!-- 定义压缩包存放位置 -->
  440. <outputDirectory>../syjy/ipfcstV3/produce/reportquery/${project.version}</outputDirectory>
  441. <!-- 定义压缩包文件名 -->
  442. <finalName>${project.artifactId}-${project.version}</finalName>
  443. <appendAssemblyId>false</appendAssemblyId>
  444. <descriptors>
  445. <descriptor>src/main/resources/assembly_base.xml</descriptor>
  446. </descriptors>
  447. </configuration>
  448. <executions>
  449. <execution>
  450. <id>make-assembly</id>
  451. <phase>package</phase>
  452. <goals>
  453. <goal>single</goal>
  454. </goals>
  455. </execution>
  456. </executions>
  457. </plugin>
  458. </plugins>
  459. </build>
  460. </project>