pom.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <groupId>com.leanwo.gateway</groupId>
  6. <artifactId>GatewayServer</artifactId>
  7. <version>0.0.1-SNAPSHOT</version>
  8. <!--指定父级依赖 -->
  9. <parent>
  10. <groupId>org.springframework.boot</groupId>
  11. <artifactId>spring-boot-starter-parent</artifactId>
  12. <version>2.2.4.RELEASE</version>
  13. <relativePath /> <!-- lookup parent from repository -->
  14. </parent>
  15. <properties>
  16. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  17. <h2.version>2.5.0-b60</h2.version>
  18. <java.version>1.8</java.version>
  19. <spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.cloud</groupId>
  28. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.springframework.cloud</groupId>
  32. <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter-test</artifactId>
  37. <scope>test</scope>
  38. </dependency>
  39. </dependencies>
  40. <dependencyManagement>
  41. <dependencies>
  42. <dependency>
  43. <groupId>org.springframework.cloud</groupId>
  44. <artifactId>spring-cloud-dependencies</artifactId>
  45. <version>${spring-cloud.version}</version>
  46. <type>pom</type>
  47. <scope>import</scope>
  48. </dependency>
  49. </dependencies>
  50. </dependencyManagement>
  51. <build>
  52. <!-- jar包名 -->
  53. <finalName>GatewayServer</finalName>
  54. <!--默认源代码目录-->
  55. <sourceDirectory>src/main/java </sourceDirectory>
  56. <!--默认测试源代码目录-->
  57. <testSourceDirectory>src/test/java</testSourceDirectory>
  58. <!--默认资源目录-->
  59. <resources>
  60. <resource>
  61. <directory>src/main/resources</directory>
  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. <skip>true</skip>
  72. </configuration>
  73. </plugin>
  74. <plugin>
  75. <groupId>org.springframework.boot</groupId>
  76. <artifactId>spring-boot-maven-plugin</artifactId>
  77. </plugin>
  78. <plugin>
  79. <groupId>org.apache.maven.plugins</groupId>
  80. <artifactId>maven-surefire-plugin</artifactId>
  81. <version>2.20.1</version>
  82. <configuration>
  83. <skip>true</skip>
  84. </configuration>
  85. </plugin>
  86. <plugin>
  87. <groupId>org.apache.maven.plugins</groupId>
  88. <artifactId>maven-jar-plugin</artifactId>
  89. <version>3.0.2</version>
  90. <configuration>
  91. <archive>
  92. <manifest>
  93. <addClasspath>true</addClasspath>
  94. <classpathPrefix>lib/</classpathPrefix>
  95. <mainClass>com.leanwo.file.server.FileServerApp</mainClass>
  96. </manifest>
  97. </archive>
  98. </configuration>
  99. </plugin>
  100. <plugin>
  101. <groupId>org.apache.maven.plugins</groupId>
  102. <artifactId>maven-dependency-plugin</artifactId>
  103. <version>2.10</version>
  104. <executions>
  105. <execution>
  106. <id>copy-dependencies</id>
  107. <phase>package</phase>
  108. <goals>
  109. <goal>copy-dependencies</goal>
  110. </goals>
  111. <configuration>
  112. <outputDirectory>${project.build.directory}/lib</outputDirectory>
  113. </configuration>
  114. </execution>
  115. </executions>
  116. </plugin>
  117. <plugin>
  118. <groupId>org.apache.maven.plugins</groupId>
  119. <artifactId>maven-resources-plugin</artifactId>
  120. <version>3.0.2</version>
  121. <executions>
  122. <execution>
  123. <id>copy-resources-config</id>
  124. <phase>package</phase>
  125. <goals>
  126. <goal>copy-resources</goal>
  127. </goals>
  128. <configuration>
  129. <encoding>UTF-8</encoding>
  130. <outputDirectory>${project.build.directory}/FileServer/config
  131. </outputDirectory>
  132. <resources>
  133. <resource>
  134. <directory>config/</directory>
  135. <excludes>
  136. <exclude>*.bat</exclude>
  137. </excludes>
  138. </resource>
  139. </resources>
  140. </configuration>
  141. </execution>
  142. <execution>
  143. <id>copy-resources-lib</id>
  144. <phase>package</phase>
  145. <goals>
  146. <goal>copy-resources</goal>
  147. </goals>
  148. <configuration>
  149. <encoding>UTF-8</encoding>
  150. <outputDirectory>${project.build.directory}/FileServer/lib
  151. </outputDirectory>
  152. <resources>
  153. <resource>
  154. <directory>${project.build.directory}/lib/</directory>
  155. </resource>
  156. </resources>
  157. </configuration>
  158. </execution>
  159. <execution>
  160. <id>copy-resources-bat</id>
  161. <phase>package</phase>
  162. <goals>
  163. <goal>copy-resources</goal>
  164. </goals>
  165. <configuration>
  166. <encoding>UTF-8</encoding>
  167. <outputDirectory>${project.build.directory}/FileServer/
  168. </outputDirectory>
  169. <resources>
  170. <resource>
  171. <directory>config/</directory>
  172. <includes>
  173. <include>*.bat</include>
  174. </includes>
  175. </resource>
  176. <resource>
  177. <directory>${project.build.directory}</directory>
  178. <includes>
  179. <include>FileServer*.jar</include>
  180. </includes>
  181. </resource>
  182. </resources>
  183. </configuration>
  184. </execution>
  185. <execution>
  186. <id>copy-resources-content</id>
  187. <phase>package</phase>
  188. <goals>
  189. <goal>copy-resources</goal>
  190. </goals>
  191. <configuration>
  192. <encoding>UTF-8</encoding>
  193. <outputDirectory>${project.build.directory}/FileServer/content
  194. </outputDirectory>
  195. <resources>
  196. <resource>
  197. <directory>content</directory>
  198. </resource>
  199. </resources>
  200. </configuration>
  201. </execution>
  202. </executions>
  203. </plugin>
  204. </plugins>
  205. </build>
  206. </project>