pom.xml 7.8 KB

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