pom.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <packaging>jar</packaging>
  7. <parent>
  8. <groupId>com.kakarote</groupId>
  9. <artifactId>wkcrm</artifactId>
  10. <version>0.0.1-SNAPSHOT</version>
  11. </parent>
  12. <artifactId>wk_authorization</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>authorization</name>
  15. <description>authorization鉴权</description>
  16. <dependencies>
  17. <dependency>
  18. <groupId>com.kakarote</groupId>
  19. <artifactId>core</artifactId>
  20. <version>${core.version}</version>
  21. </dependency>
  22. <!-- 注意是starter,自动配置 -->
  23. <dependency>
  24. <groupId>org.springframework.cloud</groupId>
  25. <artifactId>spring-cloud-starter-security</artifactId>
  26. <version>2.2.1.RELEASE</version>
  27. </dependency>
  28. <!-- https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-starter-oauth2 -->
  29. <dependency>
  30. <groupId>org.springframework.cloud</groupId>
  31. <artifactId>spring-cloud-starter-oauth2</artifactId>
  32. <version>2.2.1.RELEASE</version>
  33. <exclusions>
  34. <exclusion>
  35. <groupId>org.springframework.security.oauth.boot</groupId>
  36. <artifactId>spring-security-oauth2-autoconfigure</artifactId>
  37. </exclusion>
  38. </exclusions>
  39. </dependency>
  40. <!-- https://mvnrepository.com/artifact/org.springframework.security.oauth.boot/spring-security-oauth2-autoconfigure -->
  41. <dependency>
  42. <groupId>org.springframework.security.oauth.boot</groupId>
  43. <artifactId>spring-security-oauth2-autoconfigure</artifactId>
  44. <version>2.2.1.RELEASE</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.lionsoul</groupId>
  48. <artifactId>ip2region</artifactId>
  49. <version>1.7.2</version>
  50. </dependency>
  51. </dependencies>
  52. <build>
  53. <resources>
  54. <!--解决idea不识别resources的问题-->
  55. <resource>
  56. <directory>src/main/resources</directory>
  57. <filtering>true</filtering>
  58. </resource>
  59. </resources>
  60. <plugins>
  61. <!--打包jar-->
  62. <plugin>
  63. <groupId>org.apache.maven.plugins</groupId>
  64. <artifactId>maven-jar-plugin</artifactId>
  65. <configuration>
  66. <archive>
  67. <manifest>
  68. <addClasspath>true</addClasspath>
  69. <!--MANIFEST.MF 中 Class-Path 加入前缀-->
  70. <classpathPrefix>lib/</classpathPrefix>
  71. <!--jar包不包含唯一版本标识-->
  72. <useUniqueVersions>false</useUniqueVersions>
  73. <!--指定入口类-->
  74. <mainClass>com.kakarote.authorization.AuthorizationApplication</mainClass>
  75. </manifest>
  76. <manifestEntries>
  77. <!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
  78. <Class-Path>./config/</Class-Path>
  79. </manifestEntries>
  80. </archive>
  81. <outputDirectory>${project.build.directory}</outputDirectory>
  82. </configuration>
  83. </plugin>
  84. <!--拷贝依赖 copy-dependencies-->
  85. <plugin>
  86. <groupId>org.apache.maven.plugins</groupId>
  87. <artifactId>maven-dependency-plugin</artifactId>
  88. <executions>
  89. <execution>
  90. <id>copy-dependencies</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. <!--拷贝资源文件 copy-resources-->
  104. <plugin>
  105. <artifactId>maven-resources-plugin</artifactId>
  106. <configuration>
  107. <nonFilteredFileExtensions>
  108. <nonFilteredFileExtension>db</nonFilteredFileExtension>
  109. </nonFilteredFileExtensions>
  110. </configuration>
  111. <executions>
  112. <execution>
  113. <id>copy-resources</id>
  114. <phase>package</phase>
  115. <goals>
  116. <goal>copy-resources</goal>
  117. </goals>
  118. <configuration>
  119. <resources>
  120. <resource>
  121. <directory>src/main/resources/</directory>
  122. </resource>
  123. </resources>
  124. <outputDirectory>${project.build.directory}/config</outputDirectory>
  125. </configuration>
  126. </execution>
  127. </executions>
  128. </plugin>
  129. <plugin>
  130. <artifactId>maven-assembly-plugin</artifactId>
  131. <configuration>
  132. <finalName>${name}</finalName>
  133. <appendAssemblyId>false</appendAssemblyId>
  134. <descriptors>
  135. <descriptor>../assembly.xml</descriptor>
  136. </descriptors>
  137. </configuration>
  138. <executions>
  139. <execution>
  140. <id>make-assembly</id>
  141. <phase>package</phase>
  142. <goals>
  143. <goal>single</goal>
  144. </goals>
  145. </execution>
  146. </executions>
  147. </plugin>
  148. </plugins>
  149. </build>
  150. </project>