pom.xml 4.0 KB

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