pom.xml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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>weighbridge-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. </properties>
  20. <dependencies>
  21. <dependency>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-web</artifactId>
  24. <exclusions>
  25. <exclusion>
  26. <groupId>org.apache.logging.log4j</groupId>
  27. <artifactId>log4j-api</artifactId>
  28. </exclusion>
  29. <exclusion>
  30. <groupId>org.apache.logging.log4j</groupId>
  31. <artifactId>log4j-to-slf4j</artifactId>
  32. </exclusion>
  33. </exclusions>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.projectlombok</groupId>
  37. <artifactId>lombok</artifactId>
  38. <optional>true</optional>
  39. </dependency>
  40. <dependency>
  41. <groupId>io.netty</groupId>
  42. <artifactId>netty-all</artifactId>
  43. <version>4.1.65.Final</version>
  44. </dependency>
  45. <dependency>
  46. <groupId>cn.hutool</groupId>
  47. <artifactId>hutool-all</artifactId>
  48. <version>5.8.18</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>com.google.guava</groupId>
  52. <artifactId>guava</artifactId>
  53. <version>20.0</version>
  54. </dependency>
  55. <!-- Redis -->
  56. <dependency>
  57. <groupId>org.springframework.boot</groupId>
  58. <artifactId>spring-boot-starter-data-redis</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>org.apache.commons</groupId>
  62. <artifactId>commons-pool2</artifactId>
  63. </dependency>
  64. </dependencies>
  65. <!-- 构建配置 -->
  66. <build>
  67. <finalName>weighbridge-server</finalName>
  68. <!-- 配置资源目录 -->
  69. <resources>
  70. <resource>
  71. <directory>src/main/java</directory>
  72. <includes>
  73. <include>**/*.xml</include>
  74. </includes>
  75. </resource>
  76. <resource>
  77. <directory>src/main/resources</directory>
  78. <includes>
  79. <include>**/*.*</include>
  80. </includes>
  81. </resource>
  82. </resources>
  83. <plugins>
  84. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-jar-plugin</artifactId>
  88. <configuration>
  89. <archive>
  90. <manifest>
  91. <addClasspath>true</addClasspath>
  92. <classpathPrefix>lib/</classpathPrefix>
  93. <mainClass>${java.run.main.class}</mainClass>
  94. </manifest>
  95. </archive>
  96. </configuration>
  97. </plugin>
  98. <!-- 拷贝依赖的jar包到lib目录 -->
  99. <plugin>
  100. <groupId>org.apache.maven.plugins</groupId>
  101. <artifactId>maven-dependency-plugin</artifactId>
  102. <executions>
  103. <execution>
  104. <id>copy</id>
  105. <phase>package</phase>
  106. <goals>
  107. <goal>copy-dependencies</goal>
  108. </goals>
  109. <configuration>
  110. <outputDirectory>
  111. ${project.build.directory}/lib
  112. </outputDirectory>
  113. </configuration>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. </plugins>
  118. </build>
  119. </project>