pom.xml 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  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. </dependencies>
  76. <!-- 构建配置 -->
  77. <build>
  78. <finalName>gather-server</finalName>
  79. <!-- 配置资源目录 -->
  80. <resources>
  81. <resource>
  82. <directory>src/main/java</directory>
  83. <includes>
  84. <include>**/*.xml</include>
  85. </includes>
  86. </resource>
  87. <resource>
  88. <directory>src/main/resources</directory>
  89. <includes>
  90. <include>**/*.*</include>
  91. </includes>
  92. </resource>
  93. </resources>
  94. <plugins>
  95. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  96. <plugin>
  97. <groupId>org.apache.maven.plugins</groupId>
  98. <artifactId>maven-jar-plugin</artifactId>
  99. <configuration>
  100. <archive>
  101. <manifest>
  102. <addClasspath>true</addClasspath>
  103. <classpathPrefix>lib/</classpathPrefix>
  104. <mainClass>${java.run.main.class}</mainClass>
  105. </manifest>
  106. </archive>
  107. </configuration>
  108. </plugin>
  109. <!-- 拷贝依赖的jar包到lib目录 -->
  110. <plugin>
  111. <groupId>org.apache.maven.plugins</groupId>
  112. <artifactId>maven-dependency-plugin</artifactId>
  113. <executions>
  114. <execution>
  115. <id>copy</id>
  116. <phase>package</phase>
  117. <goals>
  118. <goal>copy-dependencies</goal>
  119. </goals>
  120. <configuration>
  121. <outputDirectory>
  122. ${project.build.directory}/lib
  123. </outputDirectory>
  124. </configuration>
  125. </execution>
  126. </executions>
  127. </plugin>
  128. <plugin>
  129. <groupId>org.springframework.boot</groupId>
  130. <artifactId>spring-boot-maven-plugin</artifactId>
  131. <configuration>
  132. <layout>ZIP</layout>
  133. <includes>
  134. <include>
  135. <groupId>nothing</groupId>
  136. <artifactId>nothing</artifactId>
  137. </include>
  138. <include>
  139. <groupId>org.springframework</groupId>
  140. <artifactId>spring-core</artifactId>
  141. </include>
  142. </includes>
  143. </configuration>
  144. </plugin>
  145. <plugin>
  146. <!-- https://gitee.com/roseboy/classfinal -->
  147. <groupId>net.roseboy</groupId>
  148. <artifactId>classfinal-maven-plugin</artifactId>
  149. <version>${classfinal.version}</version>
  150. <configuration>
  151. <!--加密打包之后pom.xml会被删除,不用担心在jar包里找到此密码-->
  152. <password>ABCabc123</password>
  153. <!--东岸-->
  154. <!-- <code>AE135DDFE7E3871BE848301327CA8E2ED41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  155. <!--北海-->
  156. <code>AE135DDFE7E3871BE848301327CA8E2ED41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>
  157. <!--限定区域-->
  158. <!-- <code>C41BF0CE8FF4E89D45E95A3AFB46E2E9D41D8CD98F00B204E9800998ECF8427ED41D8CD98F00B204E9800998ECF8427E</code>-->
  159. <packages>com.gzlh</packages> <!--可以多个-->
  160. <!-- <cfgfiles>application.yml</cfgfiles>-->
  161. <excludes>org.spring</excludes>
  162. <!--lib包中的jar加密-->
  163. <!-- <libjars>a.jar,b.jar</libjars>-->
  164. </configuration>
  165. <executions>
  166. <execution>
  167. <phase>package</phase>
  168. <goals>
  169. <goal>classFinal</goal>
  170. </goals>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. </project>