pom.xml 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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>ad-engine-commons</artifactId>
  44. <version>1.0.0</version>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.apache.spark</groupId>
  48. <artifactId>spark-core_${scala.binary.version}</artifactId>
  49. <version>${spark.version}</version>
  50. <scope>provided</scope>
  51. <exclusions>
  52. <exclusion>
  53. <artifactId>protobuf-java</artifactId>
  54. <groupId>com.google.protobuf</groupId>
  55. </exclusion>
  56. </exclusions>
  57. </dependency>
  58. <dependency>
  59. <groupId>org.apache.spark</groupId>
  60. <artifactId>spark-sql_${scala.binary.version}</artifactId>
  61. <version>${spark.version}</version>
  62. <scope>provided</scope>
  63. <exclusions>
  64. <exclusion>
  65. <artifactId>protobuf-java</artifactId>
  66. <groupId>com.google.protobuf</groupId>
  67. </exclusion>
  68. </exclusions>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.apache.spark</groupId>
  72. <artifactId>spark-mllib_${scala.binary.version}</artifactId>
  73. <version>${spark.version}</version>
  74. <scope>provided</scope>
  75. <exclusions>
  76. <exclusion>
  77. <artifactId>protobuf-java</artifactId>
  78. <groupId>com.google.protobuf</groupId>
  79. </exclusion>
  80. </exclusions>
  81. </dependency>
  82. <dependency>
  83. <groupId>com.aliyun.odps</groupId>
  84. <artifactId>cupid-sdk</artifactId>
  85. <version>${cupid.sdk.version}</version>
  86. <scope>provided</scope>
  87. <exclusions>
  88. <exclusion>
  89. <artifactId>protobuf-java</artifactId>
  90. <groupId>com.google.protobuf</groupId>
  91. </exclusion>
  92. </exclusions>
  93. </dependency>
  94. <dependency>
  95. <groupId>com.aliyun.odps</groupId>
  96. <artifactId>hadoop-fs-oss</artifactId>
  97. <version>${cupid.sdk.version}</version>
  98. <exclusions>
  99. <exclusion>
  100. <artifactId>protobuf-java</artifactId>
  101. <groupId>com.google.protobuf</groupId>
  102. </exclusion>
  103. </exclusions>
  104. </dependency>
  105. <dependency>
  106. <groupId>org.springframework.boot</groupId>
  107. <artifactId>spring-boot-starter-data-redis</artifactId>
  108. <version>2.4.2</version>
  109. </dependency>
  110. <dependency>
  111. <groupId>redis.clients</groupId>
  112. <artifactId>jedis</artifactId>
  113. <version>3.3.0</version>
  114. </dependency>
  115. <dependency>
  116. <groupId>org.projectlombok</groupId>
  117. <artifactId>lombok</artifactId>
  118. <version>1.18.24</version>
  119. </dependency>
  120. <dependency>
  121. <groupId>com.aliyun.odps</groupId>
  122. <artifactId>odps-sdk-commons</artifactId>
  123. <version>${odps.version}</version>
  124. </dependency>
  125. <dependency>
  126. <groupId>com.aliyun.emr</groupId>
  127. <artifactId>emr-mns_2.11</artifactId>
  128. <version>${emr.version}</version>
  129. <exclusions>
  130. <exclusion>
  131. <groupId>com.aliyun.mns</groupId>
  132. <artifactId>aliyun-sdk-mns</artifactId>
  133. </exclusion>
  134. </exclusions>
  135. </dependency>
  136. <dependency>
  137. <groupId>com.aliyun.emr</groupId>
  138. <artifactId>emr-maxcompute_2.11</artifactId>
  139. <version>${emr.version}</version>
  140. </dependency>
  141. </dependencies>
  142. <build>
  143. <plugins>
  144. <plugin>
  145. <groupId>org.apache.maven.plugins</groupId>
  146. <artifactId>maven-shade-plugin</artifactId>
  147. <version>3.2.4</version>
  148. <executions>
  149. <execution>
  150. <phase>package</phase>
  151. <goals>
  152. <goal>shade</goal>
  153. </goals>
  154. <configuration>
  155. <relocations>
  156. <relocation>
  157. <pattern>com.google.protobuf</pattern>
  158. <shadedPattern>shaded.com.google.protobuf</shadedPattern>
  159. </relocation>
  160. </relocations>
  161. <minimizeJar>false</minimizeJar>
  162. <shadedArtifactAttached>true</shadedArtifactAttached>
  163. <artifactSet>
  164. <includes>
  165. <!-- Include here the dependencies you
  166. want to be packed in your fat jar -->
  167. <include>*:*</include>
  168. </includes>
  169. </artifactSet>
  170. <filters>
  171. <filter>
  172. <artifact>*:*</artifact>
  173. <excludes>
  174. <exclude>META-INF/*.SF</exclude>
  175. <exclude>META-INF/*.DSA</exclude>
  176. <exclude>META-INF/*.RSA</exclude>
  177. <exclude>**/log4j.properties</exclude>
  178. </excludes>
  179. </filter>
  180. </filters>
  181. <transformers>
  182. <transformer
  183. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  184. <resource>reference.conf</resource>
  185. </transformer>
  186. <transformer
  187. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  188. <resource>
  189. META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
  190. </resource>
  191. </transformer>
  192. </transformers>
  193. </configuration>
  194. </execution>
  195. </executions>
  196. </plugin>
  197. <plugin>
  198. <groupId>net.alchim31.maven</groupId>
  199. <artifactId>scala-maven-plugin</artifactId>
  200. <version>3.3.2</version>
  201. <executions>
  202. <execution>
  203. <id>scala-compile-first</id>
  204. <phase>process-resources</phase>
  205. <goals>
  206. <goal>compile</goal>
  207. </goals>
  208. </execution>
  209. <execution>
  210. <id>scala-test-compile-first</id>
  211. <phase>process-test-resources</phase>
  212. <goals>
  213. <goal>testCompile</goal>
  214. </goals>
  215. </execution>
  216. </executions>
  217. </plugin>
  218. </plugins>
  219. </build>
  220. </project>