pom.xml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  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>recommend-model</artifactId>
  7. <groupId>com.tzld.piaoquan</groupId>
  8. <version>1.0.0</version>
  9. </parent>
  10. <modelVersion>4.0.0</modelVersion>
  11. <artifactId>recommend-model-produce</artifactId>
  12. <properties>
  13. <spark.version>3.3.1</spark.version>
  14. <!-- <spark.version>2.3.0</spark.version>-->
  15. <!-- <spark.version>2.4.8</spark.version>-->
  16. <scala.version>2.12.15</scala.version>
  17. <emr.version>2.0.0</emr.version>
  18. <java.version>1.8</java.version>
  19. <fastjson.version>1.2.45</fastjson.version>
  20. <guava.version>32.1.3-jre</guava.version>
  21. <protobuf.version>3.24.0</protobuf.version>
  22. <maven.compiler.source>8</maven.compiler.source>
  23. <maven.compiler.target>8</maven.compiler.target>
  24. </properties>
  25. <dependencies>
  26. <dependency>
  27. <groupId>org.apache.spark</groupId>
  28. <artifactId>spark-core_2.12</artifactId>
  29. <version>${spark.version}</version>
  30. <exclusions>
  31. <!-- <exclusion>-->
  32. <!-- <groupId>io.netty</groupId>-->
  33. <!-- <artifactId>netty-all</artifactId>-->
  34. <!-- </exclusion>-->
  35. <exclusion>
  36. <artifactId>slf4j-log4j12</artifactId>
  37. <groupId>org.slf4j</groupId>
  38. </exclusion>
  39. <exclusion>
  40. <artifactId>scala-library</artifactId>
  41. <groupId>org.scala-lang</groupId>
  42. </exclusion>
  43. <exclusion>
  44. <artifactId>jersey-server</artifactId>
  45. <groupId>org.glassfish.jersey.core</groupId>
  46. </exclusion>
  47. <exclusion>
  48. <artifactId>jersey-common</artifactId>
  49. <groupId>org.glassfish.jersey.core</groupId>
  50. </exclusion>
  51. <exclusion>
  52. <artifactId>jersey-client</artifactId>
  53. <groupId>org.glassfish.jersey.core</groupId>
  54. </exclusion>
  55. <exclusion>
  56. <artifactId>jersey-container-servlet</artifactId>
  57. <groupId>org.glassfish.jersey.containers</groupId>
  58. </exclusion>
  59. <exclusion>
  60. <artifactId>jersey-container-servlet-core</artifactId>
  61. <groupId>org.glassfish.jersey.containers</groupId>
  62. </exclusion>
  63. <exclusion>
  64. <artifactId>protobuf-java</artifactId>
  65. <groupId>com.google.protobuf</groupId>
  66. </exclusion>
  67. <exclusion>
  68. <artifactId>guava</artifactId>
  69. <groupId>com.google.guava</groupId>
  70. </exclusion>
  71. </exclusions>
  72. </dependency>
  73. <dependency>
  74. <groupId>org.apache.spark</groupId>
  75. <artifactId>spark-mllib_2.12</artifactId>
  76. <version>${spark.version}</version>
  77. <exclusions>
  78. <exclusion>
  79. <artifactId>scala-library</artifactId>
  80. <groupId>org.scala-lang</groupId>
  81. </exclusion>
  82. <exclusion>
  83. <artifactId>hadoop-mapreduce-client-core</artifactId>
  84. <groupId>org.apache.hadoop</groupId>
  85. </exclusion>
  86. <exclusion>
  87. <artifactId>commons-compiler</artifactId>
  88. <groupId>org.codehaus.janino</groupId>
  89. </exclusion>
  90. <exclusion>
  91. <artifactId>janino</artifactId>
  92. <groupId>org.codehaus.janino</groupId>
  93. </exclusion>
  94. <exclusion>
  95. <artifactId>protobuf-java</artifactId>
  96. <groupId>com.google.protobuf</groupId>
  97. </exclusion>
  98. </exclusions>
  99. </dependency>
  100. <dependency>
  101. <groupId>org.glassfish.jersey.core</groupId>
  102. <artifactId>jersey-server</artifactId>
  103. <version>2.22.2</version>
  104. <exclusions>
  105. <exclusion>
  106. <artifactId>jersey-media-jaxb</artifactId>
  107. <groupId>org.glassfish.jersey.media</groupId>
  108. </exclusion>
  109. <exclusion>
  110. <artifactId>jersey-client</artifactId>
  111. <groupId>org.glassfish.jersey.core</groupId>
  112. </exclusion>
  113. <exclusion>
  114. <artifactId>jersey-common</artifactId>
  115. <groupId>org.glassfish.jersey.core</groupId>
  116. </exclusion>
  117. </exclusions>
  118. </dependency>
  119. <!-- <dependency>-->
  120. <!-- <groupId>org.glassfish.jersey</groupId>-->
  121. <!-- <artifactId>project</artifactId>-->
  122. <!-- <version>2.22.2</version>-->
  123. <!-- </dependency>-->
  124. <dependency>
  125. <groupId>org.glassfish.jersey.core</groupId>
  126. <artifactId>jersey-common</artifactId>
  127. <version>2.22.2</version>
  128. <exclusions>
  129. <exclusion>
  130. <groupId>com.google.guava</groupId>
  131. <artifactId>guava</artifactId>
  132. </exclusion>
  133. </exclusions>
  134. </dependency>
  135. <dependency>
  136. <groupId>org.glassfish.jersey.containers</groupId>
  137. <artifactId>jersey-container-servlet</artifactId>
  138. <version>2.22.2</version>
  139. </dependency>
  140. <dependency>
  141. <groupId>org.glassfish.jersey.containers</groupId>
  142. <artifactId>jersey-container-servlet-core</artifactId>
  143. <version>2.22.2</version>
  144. </dependency>
  145. <dependency>
  146. <groupId>org.glassfish.jersey.media</groupId>
  147. <artifactId>jersey-media-jaxb</artifactId>
  148. <version>2.22.2</version>
  149. <exclusions>
  150. <exclusion>
  151. <artifactId>jersey-common</artifactId>
  152. <groupId>org.glassfish.jersey.core</groupId>
  153. </exclusion>
  154. </exclusions>
  155. </dependency>
  156. <dependency>
  157. <groupId>org.glassfish.jersey.core</groupId>
  158. <artifactId>jersey-client</artifactId>
  159. <version>2.22.2</version>
  160. <exclusions>
  161. <exclusion>
  162. <artifactId>jersey-common</artifactId>
  163. <groupId>org.glassfish.jersey.core</groupId>
  164. </exclusion>
  165. </exclusions>
  166. </dependency>
  167. <dependency>
  168. <groupId>org.codehaus.janino</groupId>
  169. <artifactId>janino</artifactId>
  170. <version>3.0.16</version>
  171. </dependency>
  172. <dependency>
  173. <groupId>org.codehaus.janino</groupId>
  174. <artifactId>commons-compiler</artifactId>
  175. <version>3.0.16</version>
  176. </dependency>
  177. <dependency>
  178. <groupId>com.google.guava</groupId>
  179. <artifactId>guava</artifactId>
  180. <version>${guava.version}</version>
  181. </dependency>
  182. <dependency>
  183. <groupId>org.scala-lang</groupId>
  184. <artifactId>scala-library</artifactId>
  185. <version>${scala.version}</version>
  186. </dependency>
  187. <dependency>
  188. <groupId>com.alibaba</groupId>
  189. <artifactId>fastjson</artifactId>
  190. <version>${fastjson.version}</version>
  191. </dependency>
  192. <!-- Milvus SDK -->
  193. <dependency>
  194. <groupId>io.milvus</groupId>
  195. <artifactId>milvus-sdk-java</artifactId>
  196. <version>2.4.9</version>
  197. <exclusions>
  198. <exclusion>
  199. <artifactId>grpc-api</artifactId>
  200. <groupId>io.grpc</groupId>
  201. </exclusion>
  202. <exclusion>
  203. <artifactId>guava</artifactId>
  204. <groupId>com.google.guava</groupId>
  205. </exclusion>
  206. <exclusion>
  207. <artifactId>grpc-core</artifactId>
  208. <groupId>io.grpc</groupId>
  209. </exclusion>
  210. </exclusions>
  211. </dependency>
  212. <dependency>
  213. <groupId>org.projectlombok</groupId>
  214. <artifactId>lombok</artifactId>
  215. <version>1.18.24</version>
  216. </dependency>
  217. <dependency>
  218. <groupId>org.slf4j</groupId>
  219. <artifactId>slf4j-simple</artifactId>
  220. <version>1.7.28</version>
  221. </dependency>
  222. <dependency>
  223. <groupId>com.aliyun.oss</groupId>
  224. <artifactId>aliyun-sdk-oss</artifactId>
  225. <version>3.17.4</version>
  226. </dependency>
  227. <dependency>
  228. <groupId>ml.dmlc</groupId>
  229. <artifactId>xgboost4j-spark_2.12</artifactId>
  230. <version>1.7.6</version>
  231. <exclusions>
  232. <exclusion>
  233. <artifactId>scala-library</artifactId>
  234. <groupId>org.scala-lang</groupId>
  235. </exclusion>
  236. </exclusions>
  237. </dependency>
  238. <dependency>
  239. <groupId>com.tzld.piaoquan</groupId>
  240. <artifactId>recommend-model-jni</artifactId>
  241. <version>1.0.0</version>
  242. </dependency>
  243. <dependency>
  244. <groupId>io.grpc</groupId>
  245. <artifactId>grpc-core</artifactId>
  246. <version>1.59.1</version>
  247. <exclusions>
  248. <exclusion>
  249. <artifactId>guava</artifactId>
  250. <groupId>com.google.guava</groupId>
  251. </exclusion>
  252. </exclusions>
  253. </dependency>
  254. </dependencies>
  255. <build>
  256. <plugins>
  257. <plugin>
  258. <groupId>org.apache.maven.plugins</groupId>
  259. <artifactId>maven-shade-plugin</artifactId>
  260. <version>3.6.0</version>
  261. <executions>
  262. <execution>
  263. <phase>package</phase>
  264. <goals>
  265. <goal>shade</goal>
  266. </goals>
  267. <configuration>
  268. <!-- <artifactSet>-->
  269. <!-- <includes>-->
  270. <!-- <include>io.grpc:grpc-api</include>-->
  271. <!-- <include>com.google.guava:guava</include>-->
  272. <!-- </includes>-->
  273. <!-- </artifactSet>-->
  274. <!-- <keepDependenciesWithProvidedScope>false</keepDependenciesWithProvidedScope>-->
  275. <relocations>
  276. <relocation>
  277. <pattern>com.google.common</pattern>
  278. <shadedPattern>shade.com.google.common</shadedPattern>
  279. </relocation>
  280. </relocations>
  281. <filters>
  282. <filter>
  283. <artifact>*:*</artifact>
  284. <excludes>
  285. <exclude>META-INF/maven/**</exclude>
  286. <exclude>META-INF/*.SF</exclude>
  287. <exclude>META-INF/*.DSA</exclude>
  288. <exclude>META-INF/*.RSA</exclude>
  289. </excludes>
  290. </filter>
  291. </filters>
  292. <transformers>
  293. <transformer
  294. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  295. </transformer>
  296. </transformers>
  297. </configuration>
  298. </execution>
  299. </executions>
  300. </plugin>
  301. <!-- maven-assembly-plugin配置 -->
  302. <!-- <plugin>-->
  303. <!-- <groupId>org.apache.maven.plugins</groupId>-->
  304. <!-- <artifactId>maven-assembly-plugin</artifactId>-->
  305. <!-- <version>2.5.5</version>-->
  306. <!-- <configuration>-->
  307. <!-- <descriptorRefs>-->
  308. <!-- <descriptorRef>jar-with-dependencies</descriptorRef>-->
  309. <!-- </descriptorRefs>-->
  310. <!-- <finalName>${project.name}</finalName>-->
  311. <!-- </configuration>-->
  312. <!-- <executions>-->
  313. <!-- <execution>-->
  314. <!-- <id>make-assembly</id>-->
  315. <!-- <phase>package</phase>-->
  316. <!-- <goals>-->
  317. <!-- <goal>single</goal>-->
  318. <!-- </goals>-->
  319. <!-- </execution>-->
  320. <!-- </executions>-->
  321. <!-- </plugin>-->
  322. <plugin>
  323. <groupId>net.alchim31.maven</groupId>
  324. <artifactId>scala-maven-plugin</artifactId>
  325. <version>3.3.2</version>
  326. <executions>
  327. <execution>
  328. <id>scala-compile-first</id>
  329. <phase>process-resources</phase>
  330. <goals>
  331. <goal>compile</goal>
  332. </goals>
  333. </execution>
  334. <execution>
  335. <id>scala-test-compile-first</id>
  336. <phase>process-test-resources</phase>
  337. <goals>
  338. <goal>testCompile</goal>
  339. </goals>
  340. </execution>
  341. </executions>
  342. </plugin>
  343. </plugins>
  344. </build>
  345. </project>