pom.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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>wk_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. </dependencies>
  47. <build>
  48. <resources>
  49. <!--解决idea不识别resources的问题-->
  50. <resource>
  51. <directory>src/main/resources</directory>
  52. <filtering>true</filtering>
  53. </resource>
  54. </resources>
  55. <plugins>
  56. <!--打包jar-->
  57. <plugin>
  58. <groupId>org.apache.maven.plugins</groupId>
  59. <artifactId>maven-jar-plugin</artifactId>
  60. <configuration>
  61. <archive>
  62. <manifest>
  63. <addClasspath>true</addClasspath>
  64. <!--MANIFEST.MF 中 Class-Path 加入前缀-->
  65. <classpathPrefix>lib/</classpathPrefix>
  66. <!--jar包不包含唯一版本标识-->
  67. <useUniqueVersions>false</useUniqueVersions>
  68. <!--指定入口类-->
  69. <mainClass>com.kakarote.authorization.AuthorizationApplication</mainClass>
  70. </manifest>
  71. <manifestEntries>
  72. <!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
  73. <Class-Path>./config/</Class-Path>
  74. </manifestEntries>
  75. </archive>
  76. <outputDirectory>${project.build.directory}</outputDirectory>
  77. </configuration>
  78. </plugin>
  79. <!--拷贝依赖 copy-dependencies-->
  80. <plugin>
  81. <groupId>org.apache.maven.plugins</groupId>
  82. <artifactId>maven-dependency-plugin</artifactId>
  83. <executions>
  84. <execution>
  85. <id>copy-dependencies</id>
  86. <phase>package</phase>
  87. <goals>
  88. <goal>copy-dependencies</goal>
  89. </goals>
  90. <configuration>
  91. <outputDirectory>
  92. ${project.build.directory}/lib/
  93. </outputDirectory>
  94. </configuration>
  95. </execution>
  96. </executions>
  97. </plugin>
  98. <!--拷贝资源文件 copy-resources-->
  99. <plugin>
  100. <artifactId>maven-resources-plugin</artifactId>
  101. <executions>
  102. <execution>
  103. <id>copy-resources</id>
  104. <phase>package</phase>
  105. <goals>
  106. <goal>copy-resources</goal>
  107. </goals>
  108. <configuration>
  109. <resources>
  110. <resource>
  111. <directory>src/main/resources/</directory>
  112. </resource>
  113. </resources>
  114. <outputDirectory>${project.build.directory}/config</outputDirectory>
  115. </configuration>
  116. </execution>
  117. </executions>
  118. </plugin>
  119. <plugin>
  120. <artifactId>maven-assembly-plugin</artifactId>
  121. <configuration>
  122. <appendAssemblyId>false</appendAssemblyId>
  123. <descriptors>
  124. <descriptor>../assembly.xml</descriptor>
  125. </descriptors>
  126. </configuration>
  127. <executions>
  128. <execution>
  129. <id>make-assembly</id>
  130. <phase>package</phase>
  131. <goals>
  132. <goal>single</goal>
  133. </goals>
  134. </execution>
  135. </executions>
  136. </plugin>
  137. </plugins>
  138. </build>
  139. </project>