pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317
  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. </exclusions>
  68. </dependency>
  69. <dependency>
  70. <groupId>org.apache.spark</groupId>
  71. <artifactId>spark-mllib_2.12</artifactId>
  72. <version>${spark.version}</version>
  73. <exclusions>
  74. <exclusion>
  75. <artifactId>scala-library</artifactId>
  76. <groupId>org.scala-lang</groupId>
  77. </exclusion>
  78. <exclusion>
  79. <artifactId>hadoop-mapreduce-client-core</artifactId>
  80. <groupId>org.apache.hadoop</groupId>
  81. </exclusion>
  82. <exclusion>
  83. <artifactId>commons-compiler</artifactId>
  84. <groupId>org.codehaus.janino</groupId>
  85. </exclusion>
  86. <exclusion>
  87. <artifactId>janino</artifactId>
  88. <groupId>org.codehaus.janino</groupId>
  89. </exclusion>
  90. <exclusion>
  91. <artifactId>protobuf-java</artifactId>
  92. <groupId>com.google.protobuf</groupId>
  93. </exclusion>
  94. </exclusions>
  95. </dependency>
  96. <dependency>
  97. <groupId>org.glassfish.jersey.core</groupId>
  98. <artifactId>jersey-server</artifactId>
  99. <version>2.22.2</version>
  100. <exclusions>
  101. <exclusion>
  102. <artifactId>jersey-media-jaxb</artifactId>
  103. <groupId>org.glassfish.jersey.media</groupId>
  104. </exclusion>
  105. <exclusion>
  106. <artifactId>jersey-client</artifactId>
  107. <groupId>org.glassfish.jersey.core</groupId>
  108. </exclusion>
  109. <exclusion>
  110. <artifactId>jersey-common</artifactId>
  111. <groupId>org.glassfish.jersey.core</groupId>
  112. </exclusion>
  113. </exclusions>
  114. </dependency>
  115. <!-- <dependency>-->
  116. <!-- <groupId>org.glassfish.jersey</groupId>-->
  117. <!-- <artifactId>project</artifactId>-->
  118. <!-- <version>2.22.2</version>-->
  119. <!-- </dependency>-->
  120. <dependency>
  121. <groupId>org.glassfish.jersey.core</groupId>
  122. <artifactId>jersey-common</artifactId>
  123. <version>2.22.2</version>
  124. <exclusions>
  125. <exclusion>
  126. <groupId>com.google.guava</groupId>
  127. <artifactId>guava</artifactId>
  128. </exclusion>
  129. </exclusions>
  130. </dependency>
  131. <dependency>
  132. <groupId>org.glassfish.jersey.containers</groupId>
  133. <artifactId>jersey-container-servlet</artifactId>
  134. <version>2.22.2</version>
  135. </dependency>
  136. <dependency>
  137. <groupId>org.glassfish.jersey.containers</groupId>
  138. <artifactId>jersey-container-servlet-core</artifactId>
  139. <version>2.22.2</version>
  140. </dependency>
  141. <dependency>
  142. <groupId>org.glassfish.jersey.media</groupId>
  143. <artifactId>jersey-media-jaxb</artifactId>
  144. <version>2.22.2</version>
  145. <exclusions>
  146. <exclusion>
  147. <artifactId>jersey-common</artifactId>
  148. <groupId>org.glassfish.jersey.core</groupId>
  149. </exclusion>
  150. </exclusions>
  151. </dependency>
  152. <dependency>
  153. <groupId>org.glassfish.jersey.core</groupId>
  154. <artifactId>jersey-client</artifactId>
  155. <version>2.22.2</version>
  156. <exclusions>
  157. <exclusion>
  158. <artifactId>jersey-common</artifactId>
  159. <groupId>org.glassfish.jersey.core</groupId>
  160. </exclusion>
  161. </exclusions>
  162. </dependency>
  163. <dependency>
  164. <groupId>org.codehaus.janino</groupId>
  165. <artifactId>janino</artifactId>
  166. <version>3.0.16</version>
  167. </dependency>
  168. <dependency>
  169. <groupId>org.codehaus.janino</groupId>
  170. <artifactId>commons-compiler</artifactId>
  171. <version>3.0.16</version>
  172. </dependency>
  173. <!-- <dependency>-->
  174. <!-- <groupId>com.google.guava</groupId>-->
  175. <!-- <artifactId>guava</artifactId>-->
  176. <!-- <version>14.0.1</version>-->
  177. <!-- </dependency>-->
  178. <dependency>
  179. <groupId>org.scala-lang</groupId>
  180. <artifactId>scala-library</artifactId>
  181. <version>${scala.version}</version>
  182. </dependency>
  183. <dependency>
  184. <groupId>com.alibaba</groupId>
  185. <artifactId>fastjson</artifactId>
  186. <version>${fastjson.version}</version>
  187. </dependency>
  188. <!-- Milvus SDK -->
  189. <dependency>
  190. <groupId>io.milvus</groupId>
  191. <artifactId>milvus-sdk-java</artifactId>
  192. <version>2.4.9</version>
  193. </dependency>
  194. <dependency>
  195. <groupId>org.projectlombok</groupId>
  196. <artifactId>lombok</artifactId>
  197. <version>1.18.24</version>
  198. </dependency>
  199. <dependency>
  200. <groupId>org.slf4j</groupId>
  201. <artifactId>slf4j-simple</artifactId>
  202. <version>1.7.28</version>
  203. </dependency>
  204. <dependency>
  205. <groupId>com.aliyun.oss</groupId>
  206. <artifactId>aliyun-sdk-oss</artifactId>
  207. <version>3.17.4</version>
  208. </dependency>
  209. <dependency>
  210. <groupId>ml.dmlc</groupId>
  211. <artifactId>xgboost4j-spark_2.12</artifactId>
  212. <version>1.7.6</version>
  213. <exclusions>
  214. <exclusion>
  215. <artifactId>scala-library</artifactId>
  216. <groupId>org.scala-lang</groupId>
  217. </exclusion>
  218. </exclusions>
  219. </dependency>
  220. <dependency>
  221. <groupId>com.tzld.piaoquan</groupId>
  222. <artifactId>recommend-model-jni</artifactId>
  223. <version>1.0.0</version>
  224. </dependency>
  225. </dependencies>
  226. <build>
  227. <plugins>
  228. <plugin>
  229. <groupId>org.apache.maven.plugins</groupId>
  230. <artifactId>maven-shade-plugin</artifactId>
  231. <version>3.2.3</version>
  232. <executions>
  233. <execution>
  234. <phase>package</phase>
  235. <goals>
  236. <goal>shade</goal>
  237. </goals>
  238. <configuration>
  239. <relocations>
  240. <relocation>
  241. <pattern>com.google.common</pattern>
  242. <shadedPattern>shade.com.google.common</shadedPattern>
  243. </relocation>
  244. </relocations>
  245. <filters>
  246. <filter>
  247. <artifact>*:*</artifact>
  248. <excludes>
  249. <exclude>META-INF/maven/**</exclude>
  250. <exclude>META-INF/*.SF</exclude>
  251. <exclude>META-INF/*.DSA</exclude>
  252. <exclude>META-INF/*.RSA</exclude>
  253. </excludes>
  254. </filter>
  255. </filters>
  256. <transformers>
  257. <transformer
  258. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  259. </transformer>
  260. <transformer
  261. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  262. </transformer>
  263. </transformers>
  264. </configuration>
  265. </execution>
  266. </executions>
  267. </plugin>
  268. <!-- maven-assembly-plugin配置 -->
  269. <plugin>
  270. <groupId>org.apache.maven.plugins</groupId>
  271. <artifactId>maven-assembly-plugin</artifactId>
  272. <version>2.5.5</version>
  273. <configuration>
  274. <descriptorRefs>
  275. <descriptorRef>jar-with-dependencies</descriptorRef>
  276. </descriptorRefs>
  277. <finalName>${project.name}</finalName>
  278. </configuration>
  279. <executions>
  280. <execution>
  281. <id>make-assembly</id>
  282. <phase>package</phase>
  283. <goals>
  284. <goal>single</goal>
  285. </goals>
  286. </execution>
  287. </executions>
  288. </plugin>
  289. <plugin>
  290. <groupId>net.alchim31.maven</groupId>
  291. <artifactId>scala-maven-plugin</artifactId>
  292. <version>3.3.2</version>
  293. <executions>
  294. <execution>
  295. <id>scala-compile-first</id>
  296. <phase>process-resources</phase>
  297. <goals>
  298. <goal>compile</goal>
  299. </goals>
  300. </execution>
  301. <execution>
  302. <id>scala-test-compile-first</id>
  303. <phase>process-test-resources</phase>
  304. <goals>
  305. <goal>testCompile</goal>
  306. </goals>
  307. </execution>
  308. </executions>
  309. </plugin>
  310. </plugins>
  311. </build>
  312. </project>