pom.xml 9.0 KB

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