pom.xml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. <parent>
  6. <artifactId>powerjob</artifactId>
  7. <groupId>tech.powerjob</groupId>
  8. <version>4.3.9</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>powerjob-official-processors</artifactId>
  12. <version>4.3.9</version>
  13. <packaging>jar</packaging>
  14. <properties>
  15. <mvn.shade.plugin.version>3.2.4</mvn.shade.plugin.version>
  16. <!-- 不会被打包的部分,scope 只能是 test 或 provide -->
  17. <junit.version>5.9.1</junit.version>
  18. <logback.version>1.2.13</logback.version>
  19. <powerjob.worker.version>4.3.9</powerjob.worker.version>
  20. <h2.db.version>2.2.224</h2.db.version>
  21. <mysql.version>8.0.28</mysql.version>
  22. <spring.version>5.3.31</spring.version>
  23. <!-- 全部 shade 化,避免依赖冲突 -->
  24. <fastjson.version>1.2.83</fastjson.version>
  25. <okhttp.version>3.14.9</okhttp.version>
  26. <guava.version>30.1.1-jre</guava.version>
  27. <commons.io.version>2.11.0</commons.io.version>
  28. <commons.lang.version>3.10</commons.lang.version>
  29. </properties>
  30. <dependencies>
  31. <!-- fastJson(used for serialization of DAG) -->
  32. <dependency>
  33. <groupId>com.alibaba</groupId>
  34. <artifactId>fastjson</artifactId>
  35. <version>${fastjson.version}</version>
  36. </dependency>
  37. <!-- OKHttp -->
  38. <dependency>
  39. <groupId>com.squareup.okhttp3</groupId>
  40. <artifactId>okhttp</artifactId>
  41. <version>${okhttp.version}</version>
  42. </dependency>
  43. <!-- commons-io -->
  44. <dependency>
  45. <groupId>commons-io</groupId>
  46. <artifactId>commons-io</artifactId>
  47. <version>${commons.io.version}</version>
  48. </dependency>
  49. <dependency>
  50. <groupId>org.apache.commons</groupId>
  51. <artifactId>commons-lang3</artifactId>
  52. <version>${commons.lang.version}</version>
  53. </dependency>
  54. <!-- guava -->
  55. <dependency>
  56. <groupId>com.google.guava</groupId>
  57. <artifactId>guava</artifactId>
  58. <version>${guava.version}</version>
  59. </dependency>
  60. <dependency>
  61. <groupId>tech.powerjob</groupId>
  62. <artifactId>powerjob-worker</artifactId>
  63. <version>${powerjob.worker.version}</version>
  64. <scope>provided</scope>
  65. </dependency>
  66. <!-- Spring 依赖(非强依赖) -->
  67. <dependency>
  68. <groupId>org.springframework</groupId>
  69. <artifactId>spring-context</artifactId>
  70. <version>${spring.version}</version>
  71. <scope>provided</scope>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.springframework</groupId>
  75. <artifactId>spring-jdbc</artifactId>
  76. <version>${spring.version}</version>
  77. <scope>test</scope>
  78. </dependency>
  79. <!-- Junit tests -->
  80. <dependency>
  81. <groupId>org.junit.jupiter</groupId>
  82. <artifactId>junit-jupiter-api</artifactId>
  83. <version>${junit.version}</version>
  84. <scope>test</scope>
  85. </dependency>
  86. <!-- log for test stage -->
  87. <dependency>
  88. <groupId>ch.qos.logback</groupId>
  89. <artifactId>logback-classic</artifactId>
  90. <version>${logback.version}</version>
  91. <scope>test</scope>
  92. </dependency>
  93. <!-- h2 database -->
  94. <dependency>
  95. <groupId>com.h2database</groupId>
  96. <artifactId>h2</artifactId>
  97. <version>${h2.db.version}</version>
  98. <scope>test</scope>
  99. </dependency>
  100. <dependency>
  101. <groupId>mysql</groupId>
  102. <artifactId>mysql-connector-java</artifactId>
  103. <version>${mysql.version}</version>
  104. <scope>test</scope>
  105. </dependency>
  106. </dependencies>
  107. <build>
  108. <plugins>
  109. <plugin>
  110. <groupId>org.apache.maven.plugins</groupId>
  111. <artifactId>maven-shade-plugin</artifactId>
  112. <version>${mvn.shade.plugin.version}</version>
  113. <configuration>
  114. <createDependencyReducedPom>false</createDependencyReducedPom>
  115. <minimizeJar>true</minimizeJar>
  116. <relocations>
  117. <relocation>
  118. <pattern>okhttp3</pattern>
  119. <shadedPattern>shade.powerjob.okhttp3</shadedPattern>
  120. </relocation>
  121. <relocation>
  122. <pattern>okio</pattern>
  123. <shadedPattern>shade.powerjob.okio</shadedPattern>
  124. </relocation>
  125. <relocation>
  126. <pattern>org</pattern>
  127. <shadedPattern>shade.powerjob.org</shadedPattern>
  128. <excludes>
  129. <exclude>org.slf4j.*</exclude>
  130. <exclude>org.springframework.**</exclude>
  131. <exclude>org.w3c.**</exclude>
  132. </excludes>
  133. </relocation>
  134. <relocation>
  135. <pattern>com.google</pattern>
  136. <shadedPattern>shade.powerjob.com.google</shadedPattern>
  137. </relocation>
  138. <relocation>
  139. <pattern>com.alibaba</pattern>
  140. <shadedPattern>shade.powerjob.com.alibaba</shadedPattern>
  141. </relocation>
  142. </relocations>
  143. </configuration>
  144. <executions>
  145. <execution>
  146. <phase>package</phase>
  147. <goals>
  148. <goal>shade</goal>
  149. </goals>
  150. </execution>
  151. </executions>
  152. </plugin>
  153. </plugins>
  154. </build>
  155. </project>