pom.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  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-group</id>
  8. <name>jiayue maven</name>
  9. <url>http://49.4.68.219:8888/repository/jiayue-group/</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-upload</artifactId>
  20. <version>3.3.0</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. <dependency>
  51. <groupId>com.jiayue.ipfcst</groupId>
  52. <artifactId>ipfcst-common-data</artifactId>
  53. <version>3.0.0</version>
  54. </dependency>
  55. <dependency>
  56. <groupId>org.springframework.boot</groupId>
  57. <artifactId>spring-boot-starter-actuator</artifactId>
  58. </dependency>
  59. <!--配置文件处理器-->
  60. <dependency>
  61. <groupId>org.springframework.boot</groupId>
  62. <artifactId>spring-boot-configuration-processor</artifactId>
  63. <optional>true</optional>
  64. </dependency>
  65. <!--Lombok-->
  66. <dependency>
  67. <groupId>org.projectlombok</groupId>
  68. <artifactId>lombok</artifactId>
  69. <scope>provided</scope>
  70. </dependency>
  71. <!--测试依赖-->
  72. <dependency>
  73. <groupId>org.springframework.boot</groupId>
  74. <artifactId>spring-boot-starter-test</artifactId>
  75. <scope>test</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>cn.hutool</groupId>
  79. <artifactId>hutool-all</artifactId>
  80. <version>5.3.5</version>
  81. </dependency>
  82. <!-- https://mvnrepository.com/artifact/com.googlecode.aviator/aviator -->
  83. <dependency>
  84. <groupId>com.googlecode.aviator</groupId>
  85. <artifactId>aviator</artifactId>
  86. <version>${aviator.version}</version>
  87. </dependency>
  88. <!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
  89. <dependency>
  90. <groupId>com.alibaba</groupId>
  91. <artifactId>fastjson</artifactId>
  92. <version>${fastjson.version}</version>
  93. </dependency>
  94. <!-- <dependency>-->
  95. <!-- <groupId>org.apache.commons</groupId>-->
  96. <!-- <artifactId>commons-lang3</artifactId>-->
  97. <!-- </dependency>-->
  98. <!-- <dependency>-->
  99. <!-- <groupId>org.apache.commons</groupId>-->
  100. <!-- <artifactId>commons-dbcp2</artifactId>-->
  101. <!-- <version>${commons-dbcp2.version}</version>-->
  102. <!-- </dependency>-->
  103. <dependency>
  104. <groupId>commons-fileupload</groupId>
  105. <artifactId>commons-fileupload</artifactId>
  106. <version>${commons.fileupload.version}</version>
  107. </dependency>
  108. <dependency>
  109. <groupId>org.reflections</groupId>
  110. <artifactId>reflections</artifactId>
  111. <version>${reflections.version}</version>
  112. <exclusions>
  113. <exclusion>
  114. <artifactId>javassist</artifactId>
  115. <groupId>org.javassist</groupId>
  116. </exclusion>
  117. </exclusions>
  118. </dependency>
  119. <dependency>
  120. <groupId>org.apache.commons</groupId>
  121. <artifactId>commons-lang3</artifactId>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.springframework.boot</groupId>
  125. <artifactId>spring-boot-starter-undertow</artifactId>
  126. </dependency>
  127. <dependency>
  128. <groupId>org.springframework.boot</groupId>
  129. <artifactId>spring-boot-starter-web</artifactId>
  130. </dependency>
  131. <dependency>
  132. <groupId>org.apache.velocity</groupId>
  133. <artifactId>velocity</artifactId>
  134. <version>${velocity.version}</version>
  135. </dependency>
  136. <dependency>
  137. <groupId>io.netty</groupId>
  138. <artifactId>netty-all</artifactId>
  139. <version>${netty.version}</version>
  140. </dependency>
  141. <dependency>
  142. <groupId>joda-time</groupId>
  143. <artifactId>joda-time</artifactId>
  144. <version>${jodatime.version}</version>
  145. </dependency>
  146. <!--ftp上传下载依赖包-->
  147. <dependency>
  148. <groupId>commons-net</groupId>
  149. <artifactId>commons-net</artifactId>
  150. <version>${commons.net.version}</version>
  151. </dependency>
  152. <!-- SSH安全连接所使用的类库 -->
  153. <dependency>
  154. <groupId>com.jcraft</groupId>
  155. <artifactId>jsch</artifactId>
  156. <version>0.1.55</version>
  157. <scope>compile</scope>
  158. <optional>true</optional>
  159. </dependency>
  160. </dependencies>
  161. <profiles> <!--考虑到window 和linux环境 npm命令格式的问题,使用maven的profile实现动态指定命令-->
  162. <profile>
  163. <id>window</id>
  164. <properties>
  165. <npm>npm.cmd</npm>
  166. </properties>
  167. <activation>
  168. <activeByDefault>true</activeByDefault>
  169. </activation>
  170. </profile>
  171. <profile>
  172. <id>linux</id>
  173. <properties>
  174. <npm>npm</npm>
  175. </properties>
  176. </profile>
  177. </profiles>
  178. <build>
  179. <finalName>${project.artifactId}</finalName>
  180. <resources>
  181. <resource>
  182. <directory>src/main/resources</directory>
  183. <filtering>true</filtering>
  184. <excludes>
  185. <exclude>*.keystore</exclude>
  186. </excludes>
  187. </resource>
  188. <resource>
  189. <directory>src/main/resources</directory>
  190. <filtering>false</filtering>
  191. <includes>
  192. <include>*.keystore</include>
  193. </includes>
  194. </resource>
  195. </resources>
  196. <plugins>
  197. <plugin>
  198. <artifactId>maven-compiler-plugin</artifactId>
  199. <version>3.7.0</version>
  200. <configuration>
  201. <source>${java.version}</source>
  202. <target>${java.version}</target>
  203. <encoding>${project.build.sourceEncoding}</encoding>
  204. <!--<compilerArgs>-->
  205. <!--&lt;!&ndash; 过期的方法的警告&ndash;&gt;-->
  206. <!--<arg>-Xlint:deprecation</arg>-->
  207. <!--</compilerArgs>-->
  208. <compilerArguments>
  209. <!-- 是否输出所有的编译信息(包括类的加载等)-->
  210. <!--<verbose />-->
  211. <!-- 解决maven命令编译报错,因为rt.jar 和jce.jar在jre的lib下面,不在jdk的lib下面,
  212. 导致maven找不到(java7以后会出现这个问题),将这2个jar包拷贝到jdk的lib下面估计也好使-->
  213. <bootclasspath>${java.home}\lib\rt.jar;${java.home}\lib\jce.jar</bootclasspath>
  214. </compilerArguments>
  215. </configuration>
  216. </plugin>
  217. <!--跳过test类-->
  218. <plugin>
  219. <groupId>org.apache.maven.plugins</groupId>
  220. <artifactId>maven-surefire-plugin</artifactId>
  221. <version>2.21.0</version>
  222. <configuration>
  223. <skipTests>true</skipTests>
  224. </configuration>
  225. </plugin>
  226. <plugin>
  227. <groupId>org.springframework.boot</groupId>
  228. <artifactId>spring-boot-maven-plugin</artifactId>
  229. <version>2.1.7.RELEASE</version>
  230. <executions>
  231. <execution>
  232. <goals>
  233. <goal>repackage</goal>
  234. </goals>
  235. </execution>
  236. </executions>
  237. </plugin>
  238. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  239. <!--拷贝依赖jar文件到ipfcst-lib目录下-->
  240. <plugin>
  241. <groupId>org.apache.maven.plugins</groupId>
  242. <artifactId>maven-dependency-plugin</artifactId>
  243. <version>2.10</version>
  244. <executions>
  245. <execution>
  246. <id>copy-dependencies</id>
  247. <phase>package</phase>
  248. <goals>
  249. <goal>copy-dependencies</goal>
  250. </goals>
  251. <configuration>
  252. <excludeArtifactIds>ipfcst-common-data</excludeArtifactIds>
  253. <outputDirectory>../syjy/ipfcstV3/ipfcst-lib</outputDirectory>
  254. </configuration>
  255. </execution>
  256. </executions>
  257. </plugin>
  258. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  259. <plugin>
  260. <groupId>org.apache.maven.plugins</groupId>
  261. <artifactId>maven-resources-plugin</artifactId>
  262. <version>3.1.0</version>
  263. <configuration>
  264. <nonFilteredFileExtensions>
  265. <nonFilteredFileExtension>woff</nonFilteredFileExtension>
  266. <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
  267. <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
  268. <nonFilteredFileExtension>eot</nonFilteredFileExtension>
  269. <nonFilteredFileExtension>swf</nonFilteredFileExtension>
  270. <nonFilteredFileExtension>ico</nonFilteredFileExtension>
  271. <nonFilteredFileExtension>png</nonFilteredFileExtension>
  272. </nonFilteredFileExtensions>
  273. <includeEmptyDirs>true</includeEmptyDirs>
  274. </configuration>
  275. <executions>
  276. <execution>
  277. <id>copy config</id>
  278. <phase>package</phase>
  279. <goals>
  280. <goal>copy-resources</goal>
  281. </goals>
  282. <configuration>
  283. <resources>
  284. <resource>
  285. <directory>src/main/resources</directory>
  286. <includes>
  287. <include>application.yml</include>
  288. <include>vms/**</include>
  289. </includes>
  290. </resource>
  291. </resources>
  292. <outputDirectory>../syjy/ipfcstV3/produce/upload/${project.version}</outputDirectory>
  293. </configuration>
  294. </execution>
  295. <execution>
  296. <id>copy-start-upload.sh</id>
  297. <!-- here the phase you need -->
  298. <phase>compile</phase>
  299. <goals>
  300. <goal>copy-resources</goal>
  301. </goals>
  302. <configuration>
  303. <outputDirectory>../syjy/ipfcstV3/bin</outputDirectory>
  304. <resources>
  305. <resource>
  306. <directory>target/classes</directory>
  307. <includes>
  308. <include>start-upload.sh</include>
  309. </includes>
  310. </resource>
  311. </resources>
  312. </configuration>
  313. </execution>
  314. </executions>
  315. </plugin>
  316. <plugin>
  317. <groupId>org.apache.maven.plugins</groupId>
  318. <artifactId>maven-jar-plugin</artifactId>
  319. <version>2.6</version>
  320. <configuration>
  321. <excludes>
  322. <exclude>application.yml</exclude>
  323. <exclude>logback-upload.xml</exclude>
  324. </excludes>
  325. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  326. <archive>
  327. <manifest>
  328. <addClasspath>true</addClasspath>
  329. <classpathPrefix>/home/syjy/ipfcstV3/ipfcst-lib/</classpathPrefix>
  330. <mainClass>com.jiayue.ipfcst.upload.UploadApplication</mainClass>
  331. </manifest>
  332. <!-- 用maven在MANIFEST.MF资料中的Class-Path中增加当前目录(.) -->
  333. <manifestEntries>
  334. <Class-Path>/home/syjy/ipfcstV3/ipfcst-lib</Class-Path>
  335. </manifestEntries>
  336. </archive>
  337. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  338. </configuration>
  339. </plugin>
  340. <plugin>
  341. <groupId>org.springframework.boot</groupId>
  342. <artifactId>spring-boot-maven-plugin</artifactId>
  343. <version>2.1.7.RELEASE</version>
  344. <configuration>
  345. <outputDirectory>../syjy/ipfcstV3/produce/upload/${project.version}</outputDirectory>
  346. <!--////////////////////////////////////////////////////小包配置开始//////////////////////////////////////-->
  347. <includes>
  348. <include>
  349. <groupId>nothing</groupId>
  350. <artifactId>nothing</artifactId>
  351. </include>
  352. <include>
  353. <groupId>com.jiayue.ipfcst</groupId>
  354. <artifactId>ipfcst-common-data</artifactId>
  355. </include>
  356. </includes>
  357. <!--////////////////////////////////////////////////////小包配置结束//////////////////////////////////////-->
  358. <!--控制是否启用支持Linux下service方式运行-->
  359. <executable>false</executable>
  360. </configuration>
  361. <executions>
  362. <execution>
  363. <goals>
  364. <goal>build-info</goal>
  365. <goal>repackage</goal>
  366. </goals>
  367. </execution>
  368. </executions>
  369. </plugin>
  370. <plugin>
  371. <artifactId>maven-assembly-plugin</artifactId>
  372. <version>2.2.1</version>
  373. <configuration>
  374. <!-- 定义压缩包存放位置 -->
  375. <outputDirectory>../syjy/ipfcstV3/produce/upload/${project.version}</outputDirectory>
  376. <!-- 定义压缩包文件名 -->
  377. <finalName>${project.artifactId}-${project.version}</finalName>
  378. <appendAssemblyId>false</appendAssemblyId>
  379. <descriptors>
  380. <descriptor>src/main/resources/assembly_base.xml</descriptor>
  381. </descriptors>
  382. </configuration>
  383. <executions>
  384. <execution>
  385. <id>make-assembly</id>
  386. <phase>package</phase>
  387. <goals>
  388. <goal>single</goal>
  389. </goals>
  390. </execution>
  391. </executions>
  392. </plugin>
  393. </plugins>
  394. </build>
  395. <!--上传配置 必须 -->
  396. <distributionManagement>
  397. <repository>
  398. <id>jiayue-releases</id>
  399. <name>Nexus Release Repository</name>
  400. <url>http://49.4.68.219:8888/repository/jiayue-releases/</url>
  401. </repository>
  402. <snapshotRepository>
  403. <id>jiayue-snapshots</id>
  404. <name>Nexus Snapshot Repository</name>
  405. <url>http://49.4.68.219:8888/repository/jiayue-snapshots/</url>
  406. </snapshotRepository>
  407. </distributionManagement>
  408. </project>