pom.xml 4.9 KB

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