pom.xml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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_admin</artifactId>
  12. <version>0.0.1-SNAPSHOT</version>
  13. <name>admin</name>
  14. <description>系统管理</description>
  15. <dependencies>
  16. <dependency>
  17. <groupId>com.kakarote</groupId>
  18. <artifactId>core</artifactId>
  19. <version>${core.version}</version>
  20. </dependency>
  21. <dependency>
  22. <groupId>io.seata</groupId>
  23. <artifactId>seata-spring-boot-starter</artifactId>
  24. </dependency>
  25. <!-- elasticsearch 版本为6.8.6-->
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-data-elasticsearch</artifactId>
  29. </dependency>
  30. </dependencies>
  31. <build>
  32. <resources>
  33. <resource>
  34. <!-- xml放在java目录下-->
  35. <directory>src/main/java/com/kakarote/${name}/</directory>
  36. <includes>
  37. <include>**/*.xml</include>
  38. </includes>
  39. </resource>
  40. <!--解决idea不识别resources的问题-->
  41. <resource>
  42. <directory>src/main/resources</directory>
  43. <filtering>true</filtering>
  44. </resource>
  45. </resources>
  46. <plugins>
  47. <!--打包jar-->
  48. <plugin>
  49. <groupId>org.apache.maven.plugins</groupId>
  50. <artifactId>maven-jar-plugin</artifactId>
  51. <configuration>
  52. <archive>
  53. <manifest>
  54. <addClasspath>true</addClasspath>
  55. <!--MANIFEST.MF 中 Class-Path 加入前缀-->
  56. <classpathPrefix>lib/</classpathPrefix>
  57. <!--jar包不包含唯一版本标识-->
  58. <useUniqueVersions>false</useUniqueVersions>
  59. <!--指定入口类-->
  60. <mainClass>com.kakarote.admin.AdminApplication</mainClass>
  61. </manifest>
  62. <manifestEntries>
  63. <!--MANIFEST.MF 中 Class-Path 加入资源文件目录-->
  64. <Class-Path>./config/</Class-Path>
  65. </manifestEntries>
  66. </archive>
  67. <outputDirectory>${project.build.directory}</outputDirectory>
  68. </configuration>
  69. </plugin>
  70. <!--拷贝依赖 copy-dependencies-->
  71. <plugin>
  72. <groupId>org.apache.maven.plugins</groupId>
  73. <artifactId>maven-dependency-plugin</artifactId>
  74. <executions>
  75. <execution>
  76. <id>copy-dependencies</id>
  77. <phase>package</phase>
  78. <goals>
  79. <goal>copy-dependencies</goal>
  80. </goals>
  81. <configuration>
  82. <outputDirectory>
  83. ${project.build.directory}/lib/
  84. </outputDirectory>
  85. </configuration>
  86. </execution>
  87. </executions>
  88. </plugin>
  89. <!--拷贝资源文件 copy-resources-->
  90. <plugin>
  91. <artifactId>maven-resources-plugin</artifactId>
  92. <executions>
  93. <execution>
  94. <id>copy-resources</id>
  95. <phase>package</phase>
  96. <goals>
  97. <goal>copy-resources</goal>
  98. </goals>
  99. <configuration>
  100. <resources>
  101. <resource>
  102. <directory>src/main/resources/</directory>
  103. </resource>
  104. </resources>
  105. <outputDirectory>${project.build.directory}/config</outputDirectory>
  106. </configuration>
  107. </execution>
  108. </executions>
  109. </plugin>
  110. <plugin>
  111. <artifactId>maven-assembly-plugin</artifactId>
  112. <configuration>
  113. <finalName>${name}</finalName>
  114. <appendAssemblyId>false</appendAssemblyId>
  115. <descriptors>
  116. <descriptor>../assembly.xml</descriptor>
  117. </descriptors>
  118. </configuration>
  119. <executions>
  120. <execution>
  121. <id>make-assembly</id>
  122. <phase>package</phase>
  123. <goals>
  124. <goal>single</goal>
  125. </goals>
  126. </execution>
  127. </executions>
  128. </plugin>
  129. </plugins>
  130. </build>
  131. </project>