pom.xml 16 KB

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