pom.xml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License. See accompanying LICENSE file.
  12. -->
  13. <project xmlns="http://maven.apache.org/POM/4.0.0"
  14. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  15. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  16. <modelVersion>4.0.0</modelVersion>
  17. <properties>
  18. <spark.version>3.1.1</spark.version>
  19. <oss.sdk.version>3.0.0</oss.sdk.version>
  20. <cupid.sdk.version>3.3.8-public</cupid.sdk.version>
  21. <scala.version>2.12.10</scala.version>
  22. <scala.binary.version>2.12</scala.binary.version>
  23. <odps.version>0.28.4-public</odps.version>
  24. <emr.version>2.0.0</emr.version>
  25. </properties>
  26. <groupId>com.aliyun.odps</groupId>
  27. <artifactId>spark-examples_${scala.binary.version}</artifactId>
  28. <version>1.0.0-SNAPSHOT</version>
  29. <packaging>jar</packaging>
  30. <dependencies>
  31. <dependency>
  32. <groupId>com.google.protobuf</groupId>
  33. <artifactId>protobuf-java</artifactId>
  34. <version>3.12.0</version>
  35. </dependency>
  36. <dependency>
  37. <groupId>com.tzld.piaoquan</groupId>
  38. <artifactId>recommend-server-client</artifactId>
  39. <version>1.0.1</version>
  40. </dependency>
  41. <dependency>
  42. <groupId>com.tzld.piaoquan</groupId>
  43. <artifactId>recommend-feature-client</artifactId>
  44. <version>1.0.6</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>com.tzld.piaoquan</groupId>
  48. <artifactId>ad-engine-commons</artifactId>
  49. <version>1.0.3</version>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.apache.spark</groupId>
  53. <artifactId>spark-core_${scala.binary.version}</artifactId>
  54. <version>${spark.version}</version>
  55. <scope>provided</scope>
  56. <exclusions>
  57. <exclusion>
  58. <artifactId>protobuf-java</artifactId>
  59. <groupId>com.google.protobuf</groupId>
  60. </exclusion>
  61. </exclusions>
  62. </dependency>
  63. <dependency>
  64. <groupId>org.apache.spark</groupId>
  65. <artifactId>spark-sql_${scala.binary.version}</artifactId>
  66. <version>${spark.version}</version>
  67. <scope>provided</scope>
  68. <exclusions>
  69. <exclusion>
  70. <artifactId>protobuf-java</artifactId>
  71. <groupId>com.google.protobuf</groupId>
  72. </exclusion>
  73. </exclusions>
  74. </dependency>
  75. <dependency>
  76. <groupId>org.apache.spark</groupId>
  77. <artifactId>spark-mllib_${scala.binary.version}</artifactId>
  78. <version>${spark.version}</version>
  79. <scope>provided</scope>
  80. <exclusions>
  81. <exclusion>
  82. <artifactId>protobuf-java</artifactId>
  83. <groupId>com.google.protobuf</groupId>
  84. </exclusion>
  85. </exclusions>
  86. </dependency>
  87. <dependency>
  88. <groupId>com.aliyun.odps</groupId>
  89. <artifactId>cupid-sdk</artifactId>
  90. <version>${cupid.sdk.version}</version>
  91. <scope>provided</scope>
  92. <exclusions>
  93. <exclusion>
  94. <artifactId>protobuf-java</artifactId>
  95. <groupId>com.google.protobuf</groupId>
  96. </exclusion>
  97. </exclusions>
  98. </dependency>
  99. <dependency>
  100. <groupId>com.aliyun.odps</groupId>
  101. <artifactId>hadoop-fs-oss</artifactId>
  102. <version>${cupid.sdk.version}</version>
  103. <exclusions>
  104. <exclusion>
  105. <artifactId>protobuf-java</artifactId>
  106. <groupId>com.google.protobuf</groupId>
  107. </exclusion>
  108. </exclusions>
  109. </dependency>
  110. <dependency>
  111. <groupId>org.springframework.boot</groupId>
  112. <artifactId>spring-boot-starter-data-redis</artifactId>
  113. <version>2.4.2</version>
  114. </dependency>
  115. <dependency>
  116. <groupId>redis.clients</groupId>
  117. <artifactId>jedis</artifactId>
  118. <version>3.3.0</version>
  119. </dependency>
  120. <dependency>
  121. <groupId>org.projectlombok</groupId>
  122. <artifactId>lombok</artifactId>
  123. <version>1.18.24</version>
  124. </dependency>
  125. <dependency>
  126. <groupId>com.aliyun.odps</groupId>
  127. <artifactId>odps-sdk-commons</artifactId>
  128. <version>${odps.version}</version>
  129. </dependency>
  130. <dependency>
  131. <groupId>com.aliyun.emr</groupId>
  132. <artifactId>emr-mns_2.11</artifactId>
  133. <version>${emr.version}</version>
  134. <exclusions>
  135. <exclusion>
  136. <groupId>com.aliyun.mns</groupId>
  137. <artifactId>aliyun-sdk-mns</artifactId>
  138. </exclusion>
  139. </exclusions>
  140. </dependency>
  141. <dependency>
  142. <groupId>com.aliyun.emr</groupId>
  143. <artifactId>emr-maxcompute_2.11</artifactId>
  144. <version>${emr.version}</version>
  145. </dependency>
  146. </dependencies>
  147. <build>
  148. <plugins>
  149. <plugin>
  150. <groupId>org.apache.maven.plugins</groupId>
  151. <artifactId>maven-shade-plugin</artifactId>
  152. <version>3.2.4</version>
  153. <executions>
  154. <execution>
  155. <phase>package</phase>
  156. <goals>
  157. <goal>shade</goal>
  158. </goals>
  159. <configuration>
  160. <relocations>
  161. <relocation>
  162. <pattern>com.google.protobuf</pattern>
  163. <shadedPattern>shaded.com.google.protobuf</shadedPattern>
  164. </relocation>
  165. </relocations>
  166. <minimizeJar>false</minimizeJar>
  167. <shadedArtifactAttached>true</shadedArtifactAttached>
  168. <artifactSet>
  169. <includes>
  170. <!-- Include here the dependencies you
  171. want to be packed in your fat jar -->
  172. <include>*:*</include>
  173. </includes>
  174. </artifactSet>
  175. <filters>
  176. <filter>
  177. <artifact>*:*</artifact>
  178. <excludes>
  179. <exclude>META-INF/*.SF</exclude>
  180. <exclude>META-INF/*.DSA</exclude>
  181. <exclude>META-INF/*.RSA</exclude>
  182. <exclude>**/log4j.properties</exclude>
  183. </excludes>
  184. </filter>
  185. </filters>
  186. <transformers>
  187. <transformer
  188. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  189. <resource>reference.conf</resource>
  190. </transformer>
  191. <transformer
  192. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  193. <resource>
  194. META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
  195. </resource>
  196. </transformer>
  197. </transformers>
  198. </configuration>
  199. </execution>
  200. </executions>
  201. </plugin>
  202. <plugin>
  203. <groupId>net.alchim31.maven</groupId>
  204. <artifactId>scala-maven-plugin</artifactId>
  205. <version>3.3.2</version>
  206. <executions>
  207. <execution>
  208. <id>scala-compile-first</id>
  209. <phase>process-resources</phase>
  210. <goals>
  211. <goal>compile</goal>
  212. </goals>
  213. </execution>
  214. <execution>
  215. <id>scala-test-compile-first</id>
  216. <phase>process-test-resources</phase>
  217. <goals>
  218. <goal>testCompile</goal>
  219. </goals>
  220. </execution>
  221. </executions>
  222. </plugin>
  223. </plugins>
  224. </build>
  225. </project>