pom.xml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <packaging>jar</packaging>
  6. <parent>
  7. <groupId>com.kakarote</groupId>
  8. <artifactId>wkcrm</artifactId>
  9. <version>0.0.1-SNAPSHOT</version>
  10. </parent>
  11. <artifactId>wk_gateway</artifactId>
  12. <version>0.0.1-SNAPSHOT</version>
  13. <name>gateway</name>
  14. <description>gateway网关</description>
  15. <dependencies>
  16. <dependency>
  17. <groupId>com.kakarote</groupId>
  18. <artifactId>core</artifactId>
  19. <version>${core.version}</version>
  20. <exclusions>
  21. <exclusion>
  22. <groupId>org.springframework.boot</groupId>
  23. <artifactId>spring-boot-starter-web</artifactId>
  24. </exclusion>
  25. <exclusion>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-undertow</artifactId>
  28. </exclusion>
  29. <exclusion>
  30. <groupId>com.alibaba.cloud</groupId>
  31. <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
  32. </exclusion>
  33. <exclusion>
  34. <groupId>io.seata</groupId>
  35. <artifactId>seata-spring-boot-starter</artifactId>
  36. </exclusion>
  37. <exclusion>
  38. <groupId>org.springframework.boot</groupId>
  39. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  40. </exclusion>
  41. <exclusion>
  42. <groupId>io.springfox</groupId>
  43. <artifactId>springfox-swagger2</artifactId>
  44. </exclusion>
  45. <exclusion>
  46. <groupId>io.springfox</groupId>
  47. <artifactId>springfox-data-rest</artifactId>
  48. </exclusion>
  49. </exclusions>
  50. </dependency>
  51. <!--api网关-->
  52. <dependency>
  53. <groupId>org.springframework.cloud</groupId>
  54. <artifactId>spring-cloud-starter-gateway</artifactId>
  55. </dependency>
  56. <dependency>
  57. <groupId>com.alibaba.cloud</groupId>
  58. <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
  59. </dependency>
  60. <dependency>
  61. <groupId>javax.servlet</groupId>
  62. <artifactId>javax.servlet-api</artifactId>
  63. <version>3.1.0</version>
  64. </dependency>
  65. <!--数据库-->
  66. <dependency>
  67. <groupId>com.alibaba</groupId>
  68. <artifactId>druid-spring-boot-starter</artifactId>
  69. <version>1.1.21</version>
  70. </dependency>
  71. <!--knife4j-->
  72. <dependency>
  73. <groupId>com.github.xiaoymin</groupId>
  74. <artifactId>knife4j-spring-boot-starter</artifactId>
  75. <version>${knife4j.version}</version>
  76. </dependency>
  77. </dependencies>
  78. <build>
  79. <resources>
  80. <!--解决idea不识别resources的问题-->
  81. <resource>
  82. <directory>src/main/resources</directory>
  83. <filtering>true</filtering>
  84. </resource>
  85. <resource>
  86. <directory>src/main/webapp</directory>
  87. <filtering>false</filtering>
  88. <excludes>
  89. <exclude>/*</exclude>
  90. </excludes>
  91. </resource>
  92. </resources>
  93. <plugins>
  94. <!--打包jar-->
  95. <plugin>
  96. <groupId>org.apache.maven.plugins</groupId>
  97. <artifactId>maven-jar-plugin</artifactId>
  98. <configuration>
  99. <archive>
  100. <manifest>
  101. <addClasspath>true</addClasspath>
  102. <!--MANIFEST.MF 中 Class-Path 加入前缀-->
  103. <classpathPrefix>lib/</classpathPrefix>
  104. <!--jar包不包含唯一版本标识-->
  105. <useUniqueVersions>false</useUniqueVersions>
  106. <!--指定入口类-->
  107. <mainClass>com.kakarote.gateway.GatewayApplication</mainClass>
  108. </manifest>
  109. <manifestEntries>
  110. <!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
  111. <Class-Path>./config/</Class-Path>
  112. </manifestEntries>
  113. </archive>
  114. <includes>
  115. <include>com/kakarote/**</include>
  116. <include>*.yml</include>
  117. </includes>
  118. <outputDirectory>${project.build.directory}</outputDirectory>
  119. </configuration>
  120. </plugin>
  121. <!--拷贝依赖 copy-dependencies-->
  122. <plugin>
  123. <groupId>org.apache.maven.plugins</groupId>
  124. <artifactId>maven-dependency-plugin</artifactId>
  125. <executions>
  126. <execution>
  127. <id>copy-dependencies</id>
  128. <phase>package</phase>
  129. <goals>
  130. <goal>copy-dependencies</goal>
  131. </goals>
  132. <configuration>
  133. <outputDirectory>
  134. ${project.build.directory}/lib/
  135. </outputDirectory>
  136. </configuration>
  137. </execution>
  138. </executions>
  139. </plugin>
  140. <!--拷贝资源文件 copy-resources-->
  141. <plugin>
  142. <artifactId>maven-resources-plugin</artifactId>
  143. <executions>
  144. <execution>
  145. <id>copy-resources</id>
  146. <phase>package</phase>
  147. <goals>
  148. <goal>copy-resources</goal>
  149. </goals>
  150. <configuration>
  151. <resources>
  152. <resource>
  153. <directory>src/main/resources/</directory>
  154. </resource>
  155. </resources>
  156. <outputDirectory>${project.build.directory}/config</outputDirectory>
  157. </configuration>
  158. </execution>
  159. <execution>
  160. <id>copy-public</id>
  161. <phase>package</phase>
  162. <goals>
  163. <goal>copy-resources</goal>
  164. </goals>
  165. <configuration>
  166. <resources>
  167. <resource>
  168. <directory>src/main/webapp/public</directory>
  169. </resource>
  170. </resources>
  171. <outputDirectory>${project.build.directory}/public</outputDirectory>
  172. </configuration>
  173. </execution>
  174. </executions>
  175. </plugin>
  176. <plugin>
  177. <artifactId>maven-assembly-plugin</artifactId>
  178. <configuration>
  179. <finalName>${name}</finalName>
  180. <appendAssemblyId>false</appendAssemblyId>
  181. <descriptors>
  182. <descriptor>../assembly.xml</descriptor>
  183. </descriptors>
  184. </configuration>
  185. <executions>
  186. <execution>
  187. <id>make-assembly</id>
  188. <phase>package</phase>
  189. <goals>
  190. <goal>single</goal>
  191. </goals>
  192. </execution>
  193. </executions>
  194. </plugin>
  195. </plugins>
  196. </build>
  197. </project>