pom.xml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.3.3.RELEASE</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.gzlh</groupId>
  12. <artifactId>gather-server</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>gather-server</name>
  15. <description>Demo project for Spring Boot</description>
  16. <properties>
  17. <java.version>8</java.version>
  18. <java.run.main.class>com.gzlh.GatherServerApplication</java.run.main.class>
  19. <classfinal.version>1.2.1</classfinal.version>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-web</artifactId>
  25. <exclusions>
  26. <exclusion>
  27. <groupId>org.apache.logging.log4j</groupId>
  28. <artifactId>log4j-api</artifactId>
  29. </exclusion>
  30. <exclusion>
  31. <groupId>org.apache.logging.log4j</groupId>
  32. <artifactId>log4j-to-slf4j</artifactId>
  33. </exclusion>
  34. </exclusions>
  35. </dependency>
  36. <dependency>
  37. <groupId>org.projectlombok</groupId>
  38. <artifactId>lombok</artifactId>
  39. <optional>true</optional>
  40. </dependency>
  41. <dependency>
  42. <groupId>io.netty</groupId>
  43. <artifactId>netty-all</artifactId>
  44. <version>4.1.65.Final</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>cn.hutool</groupId>
  48. <artifactId>hutool-all</artifactId>
  49. <version>5.8.18</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>com.google.guava</groupId>
  53. <artifactId>guava</artifactId>
  54. <version>20.0</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.java-websocket</groupId>
  58. <artifactId>Java-WebSocket</artifactId>
  59. <version>1.5.3</version>
  60. </dependency>
  61. <dependency>
  62. <groupId>com.sun.jna</groupId>
  63. <artifactId>jna</artifactId>
  64. <version>3.0.9</version>
  65. </dependency>
  66. <!-- Redis -->
  67. <dependency>
  68. <groupId>org.springframework.boot</groupId>
  69. <artifactId>spring-boot-starter-data-redis</artifactId>
  70. </dependency>
  71. <dependency>
  72. <groupId>org.apache.commons</groupId>
  73. <artifactId>commons-pool2</artifactId>
  74. </dependency>
  75. <dependency>
  76. <groupId>com.hikvision.ga</groupId>
  77. <artifactId>artemis-http-client</artifactId>
  78. <version>1.1.3</version>
  79. </dependency>
  80. </dependencies>
  81. <!-- 构建配置 -->
  82. <build>
  83. <finalName>gather-server</finalName>
  84. <!-- 配置资源目录 -->
  85. <resources>
  86. <resource>
  87. <directory>src/main/java</directory>
  88. <includes>
  89. <include>**/*.xml</include>
  90. </includes>
  91. </resource>
  92. <resource>
  93. <directory>src/main/resources</directory>
  94. <includes>
  95. <include>**/*.*</include>
  96. </includes>
  97. </resource>
  98. </resources>
  99. <plugins>
  100. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  101. <plugin>
  102. <groupId>org.apache.maven.plugins</groupId>
  103. <artifactId>maven-jar-plugin</artifactId>
  104. <configuration>
  105. <archive>
  106. <manifest>
  107. <addClasspath>true</addClasspath>
  108. <classpathPrefix>lib/</classpathPrefix>
  109. <mainClass>${java.run.main.class}</mainClass>
  110. </manifest>
  111. </archive>
  112. </configuration>
  113. </plugin>
  114. <!-- 拷贝依赖的jar包到lib目录 -->
  115. <plugin>
  116. <groupId>org.apache.maven.plugins</groupId>
  117. <artifactId>maven-dependency-plugin</artifactId>
  118. <executions>
  119. <execution>
  120. <id>copy</id>
  121. <phase>package</phase>
  122. <goals>
  123. <goal>copy-dependencies</goal>
  124. </goals>
  125. <configuration>
  126. <outputDirectory>
  127. ${project.build.directory}/lib
  128. </outputDirectory>
  129. </configuration>
  130. </execution>
  131. </executions>
  132. </plugin>
  133. <plugin>
  134. <groupId>org.springframework.boot</groupId>
  135. <artifactId>spring-boot-maven-plugin</artifactId>
  136. <configuration>
  137. <layout>ZIP</layout>
  138. <includes>
  139. <include>
  140. <groupId>nothing</groupId>
  141. <artifactId>nothing</artifactId>
  142. </include>
  143. <include>
  144. <groupId>org.springframework</groupId>
  145. <artifactId>spring-core</artifactId>
  146. </include>
  147. </includes>
  148. </configuration>
  149. </plugin>
  150. <plugin>
  151. <!-- https://gitee.com/roseboy/classfinal -->
  152. <groupId>net.roseboy</groupId>
  153. <artifactId>classfinal-maven-plugin</artifactId>
  154. <version>${classfinal.version}</version>
  155. <configuration>
  156. <!--加密打包之后pom.xml会被删除,不用担心在jar包里找到此密码-->
  157. <password>ABCabc123</password>
  158. <!--东岸-->
  159. <!-- <code>20DFEE057FA73408A5D454AF9D5E8F0ED41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  160. <!--联运中心-->
  161. <!-- <code>D72E7F75D4CDEEFAD7AC77891557F586D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  162. <!--北海无人地磅-->
  163. <code>AE135DDFE7E3871BE848301327CA8E2ED41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>
  164. <!--南京-->
  165. <!-- <code>A4CFD53BE12CC512727611ACFC1EE05ED41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  166. <!--限定区域-->
  167. <!-- <code>C41BF0CE8FF4E89D45E95A3AFB46E2E9D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  168. <!--联运中心无人地磅-->
  169. <!-- <code>-->
  170. <!-- C8B3CC11C158AD38AE69D6DB58E99BF8D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E-->
  171. <!-- </code>-->
  172. <packages>com.gzlh</packages> <!--可以多个-->
  173. <!-- <cfgfiles>application.yml</cfgfiles>-->
  174. <excludes>org.spring</excludes>
  175. <!--lib包中的jar加密-->
  176. <!-- <libjars>a.jar,b.jar</libjars>-->
  177. </configuration>
  178. <executions>
  179. <execution>
  180. <phase>package</phase>
  181. <goals>
  182. <goal>classFinal</goal>
  183. </goals>
  184. </execution>
  185. </executions>
  186. </plugin>
  187. </plugins>
  188. </build>
  189. </project>