pom.xml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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. </dependencies>
  56. <!-- 构建配置 -->
  57. <build>
  58. <finalName>weighbridge-server</finalName>
  59. <!-- 配置资源目录 -->
  60. <resources>
  61. <resource>
  62. <directory>src/main/java</directory>
  63. <includes>
  64. <include>**/*.xml</include>
  65. </includes>
  66. </resource>
  67. <resource>
  68. <directory>src/main/resources</directory>
  69. <includes>
  70. <include>**/*.*</include>
  71. </includes>
  72. </resource>
  73. </resources>
  74. <plugins>
  75. <!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
  76. <plugin>
  77. <groupId>org.apache.maven.plugins</groupId>
  78. <artifactId>maven-jar-plugin</artifactId>
  79. <configuration>
  80. <archive>
  81. <manifest>
  82. <addClasspath>true</addClasspath>
  83. <classpathPrefix>lib/</classpathPrefix>
  84. <mainClass>${java.run.main.class}</mainClass>
  85. </manifest>
  86. </archive>
  87. </configuration>
  88. </plugin>
  89. <!-- 拷贝依赖的jar包到lib目录 -->
  90. <plugin>
  91. <groupId>org.apache.maven.plugins</groupId>
  92. <artifactId>maven-dependency-plugin</artifactId>
  93. <executions>
  94. <execution>
  95. <id>copy</id>
  96. <phase>package</phase>
  97. <goals>
  98. <goal>copy-dependencies</goal>
  99. </goals>
  100. <configuration>
  101. <outputDirectory>
  102. ${project.build.directory}/lib
  103. </outputDirectory>
  104. </configuration>
  105. </execution>
  106. </executions>
  107. </plugin>
  108. </plugins>
  109. </build>
  110. </project>