pom.xml 17 KB

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