pom.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  2. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  3. <modelVersion>4.0.0</modelVersion>
  4. <groupId>org.leanwo.server.management</groupId>
  5. <artifactId>ServerManagement</artifactId>
  6. <version>0.0.1</version>
  7. <packaging>jar</packaging>
  8. <name>ServerManagement</name>
  9. <url>http://maven.apache.org</url>
  10. <properties>
  11. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  12. <log4j.version>2.11.1</log4j.version>
  13. <slf4j.version>1.7.25</slf4j.version>
  14. <spring.version>5.1.4.RELEASE</spring.version>
  15. </properties>
  16. <dependencies>
  17. <!-- 日志框架 slf4j(slf4j的api接口包)-->
  18. <dependency>
  19. <groupId>org.slf4j</groupId>
  20. <artifactId>slf4j-api</artifactId>
  21. <version>${slf4j.version}</version>
  22. </dependency>
  23. <!-- 日志 log4j2(log4j2的核心包) -->
  24. <dependency>
  25. <groupId>org.apache.logging.log4j</groupId>
  26. <artifactId>log4j-core</artifactId>
  27. <version>${log4j.version}</version>
  28. </dependency>
  29. <!-- 日志 log4j2(slf4j对应log4j2日志框架的驱动包) -->
  30. <dependency>
  31. <groupId>org.apache.logging.log4j</groupId>
  32. <artifactId>log4j-slf4j-impl</artifactId>
  33. <version>${log4j.version}</version>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.springframework</groupId>
  37. <artifactId>spring-core</artifactId>
  38. <version>${spring.version}</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework</groupId>
  42. <artifactId>spring-context</artifactId>
  43. <version>${spring.version}</version>
  44. </dependency>
  45. <dependency>
  46. <groupId>junit</groupId>
  47. <artifactId>junit</artifactId>
  48. <version>3.8.1</version>
  49. <scope>test</scope>
  50. </dependency>
  51. </dependencies>
  52. <build>
  53. <resources>
  54. <resource>
  55. <directory>src/main/resources</directory>
  56. <filtering>true</filtering>
  57. <includes>
  58. <include>**/*.png</include>
  59. <include>**/*.properties</include>
  60. <include>**/*.xml</include>
  61. </includes>
  62. </resource>
  63. </resources>
  64. <plugins>
  65. <plugin>
  66. <groupId>org.apache.maven.plugins</groupId>
  67. <artifactId>maven-compiler-plugin</artifactId>
  68. <configuration>
  69. <source>1.8</source>
  70. <target>1.8</target>
  71. </configuration>
  72. </plugin>
  73. <plugin>
  74. <groupId>org.apache.maven.plugins</groupId>
  75. <artifactId>maven-jar-plugin</artifactId>
  76. <version>3.0.2</version>
  77. <configuration>
  78. <archive>
  79. <manifest>
  80. <addClasspath>true</addClasspath>
  81. <classpathPrefix>lib/</classpathPrefix>
  82. <mainClass>com.leanwo.management.App</mainClass>
  83. </manifest>
  84. </archive>
  85. </configuration>
  86. </plugin>
  87. <plugin>
  88. <groupId>org.apache.maven.plugins</groupId>
  89. <artifactId>maven-dependency-plugin</artifactId>
  90. <version>2.10</version>
  91. <executions>
  92. <execution>
  93. <id>copy-dependencies</id>
  94. <phase>package</phase>
  95. <goals>
  96. <goal>copy-dependencies</goal>
  97. </goals>
  98. <configuration>
  99. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  100. </configuration>
  101. </execution>
  102. </executions>
  103. </plugin>
  104. <plugin>
  105. <groupId>org.apache.maven.plugins</groupId>
  106. <artifactId>maven-resources-plugin</artifactId>
  107. <version>3.0.2</version>
  108. <executions>
  109. <execution>
  110. <id>copy-resources-config</id>
  111. <phase>package</phase>
  112. <goals>
  113. <goal>copy-resources</goal>
  114. </goals>
  115. <configuration>
  116. <encoding>UTF-8</encoding>
  117. <outputDirectory>${project.build.directory}/ServerManagement/config
  118. </outputDirectory>
  119. <resources>
  120. <resource>
  121. <directory>config/</directory>
  122. <excludes>
  123. <exclude>*.bat</exclude>
  124. </excludes>
  125. </resource>
  126. </resources>
  127. </configuration>
  128. </execution>
  129. <execution>
  130. <id>copy-resources-lib</id>
  131. <phase>package</phase>
  132. <goals>
  133. <goal>copy-resources</goal>
  134. </goals>
  135. <configuration>
  136. <encoding>UTF-8</encoding>
  137. <outputDirectory>${project.build.directory}/ServerManagement/lib
  138. </outputDirectory>
  139. <resources>
  140. <resource>
  141. <directory>${project.build.directory}/lib/</directory>
  142. </resource>
  143. </resources>
  144. </configuration>
  145. </execution>
  146. <execution>
  147. <id>copy-resources-bat</id>
  148. <phase>package</phase>
  149. <goals>
  150. <goal>copy-resources</goal>
  151. </goals>
  152. <configuration>
  153. <encoding>UTF-8</encoding>
  154. <outputDirectory>${project.build.directory}/ServerManagement/
  155. </outputDirectory>
  156. <resources>
  157. <resource>
  158. <directory>config/</directory>
  159. <includes>
  160. <include>*.bat</include>
  161. </includes>
  162. </resource>
  163. <resource>
  164. <directory>${project.build.directory}</directory>
  165. <includes>
  166. <include>ServerManagement*.jar</include>
  167. </includes>
  168. </resource>
  169. </resources>
  170. </configuration>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. </project>