pom.xml 8.8 KB

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