pom.xml 8.2 KB

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