pom.xml 3.7 KB

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