pom.xml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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>2.3.0</spark.version>
  19. <cupid.sdk.version>3.3.8-public</cupid.sdk.version>
  20. <scala.version>2.11.8</scala.version>
  21. <scala.binary.version>2.11</scala.binary.version>
  22. <java.version>1.8</java.version>
  23. <maven.compiler.source>${java.version}</maven.compiler.source>
  24. <maven.compiler.target>${java.version}</maven.compiler.target>
  25. <emr.version>2.0.0</emr.version>
  26. <odps.version>0.28.4-public</odps.version>
  27. </properties>
  28. <groupId>com.aliyun.odps</groupId>
  29. <artifactId>spark-examples</artifactId>
  30. <version>1.0.0-SNAPSHOT</version>
  31. <packaging>jar</packaging>
  32. <dependencies>
  33. <dependency>
  34. <groupId>com.tzld.piaoquan</groupId>
  35. <artifactId>recommend-server-client</artifactId>
  36. <version>1.0.1</version>
  37. </dependency>
  38. <dependency>
  39. <groupId>com.tzld.piaoquan</groupId>
  40. <artifactId>recommend-feature-client</artifactId>
  41. <version>1.0.0</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>com.tzld.piaoquan</groupId>
  45. <artifactId>ad-engine-commons</artifactId>
  46. <version>1.0.1</version>
  47. </dependency>
  48. <dependency>
  49. <groupId>org.apache.spark</groupId>
  50. <artifactId>spark-core_${scala.binary.version}</artifactId>
  51. <version>${spark.version}</version>
  52. <scope>provided</scope>
  53. <exclusions>
  54. <exclusion>
  55. <groupId>org.scala-lang</groupId>
  56. <artifactId>scala-library</artifactId>
  57. </exclusion>
  58. <exclusion>
  59. <groupId>org.scala-lang</groupId>
  60. <artifactId>scalap</artifactId>
  61. </exclusion>
  62. </exclusions>
  63. </dependency>
  64. <dependency>
  65. <groupId>org.apache.spark</groupId>
  66. <artifactId>spark-sql_${scala.binary.version}</artifactId>
  67. <version>${spark.version}</version>
  68. <scope>provided</scope>
  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. </dependency>
  76. <dependency>
  77. <groupId>org.apache.spark</groupId>
  78. <artifactId>spark-streaming_${scala.binary.version}</artifactId>
  79. <version>${spark.version}</version>
  80. <scope>provided</scope>
  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. </dependency>
  88. <dependency>
  89. <groupId>com.aliyun.odps</groupId>
  90. <artifactId>hadoop-fs-oss</artifactId>
  91. <version>${cupid.sdk.version}</version>
  92. </dependency>
  93. <dependency>
  94. <groupId>com.aliyun.odps</groupId>
  95. <artifactId>odps-spark-datasource_${scala.binary.version}</artifactId>
  96. <version>${cupid.sdk.version}</version>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.scala-lang</groupId>
  100. <artifactId>scala-library</artifactId>
  101. <version>${scala.version}</version>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.scala-lang</groupId>
  105. <artifactId>scala-actors</artifactId>
  106. <version>${scala.version}</version>
  107. </dependency>
  108. <dependency>
  109. <groupId>com.aliyun.emr</groupId>
  110. <artifactId>emr-maxcompute_2.11</artifactId>
  111. <version>${emr.version}</version>
  112. </dependency>
  113. <dependency>
  114. <groupId>org.springframework.boot</groupId>
  115. <artifactId>spring-boot-starter-data-redis</artifactId>
  116. <version>2.4.2</version>
  117. </dependency>
  118. <dependency>
  119. <groupId>redis.clients</groupId>
  120. <artifactId>jedis</artifactId>
  121. <version>3.3.0</version>
  122. </dependency>
  123. <dependency>
  124. <groupId>org.projectlombok</groupId>
  125. <artifactId>lombok</artifactId>
  126. <version>1.18.24</version>
  127. </dependency>
  128. </dependencies>
  129. <build>
  130. <plugins>
  131. <plugin>
  132. <groupId>org.apache.maven.plugins</groupId>
  133. <artifactId>maven-shade-plugin</artifactId>
  134. <version>3.2.4</version>
  135. <executions>
  136. <execution>
  137. <phase>package</phase>
  138. <goals>
  139. <goal>shade</goal>
  140. </goals>
  141. <configuration>
  142. <relocations>
  143. <relocation>
  144. <pattern>com.google.protobuf</pattern>
  145. <shadedPattern>shaded.com.google.protobuf</shadedPattern>
  146. </relocation>
  147. </relocations>
  148. <minimizeJar>false</minimizeJar>
  149. <shadedArtifactAttached>true</shadedArtifactAttached>
  150. <artifactSet>
  151. <includes>
  152. <!-- Include here the dependencies you
  153. want to be packed in your fat jar -->
  154. <include>*:*</include>
  155. </includes>
  156. </artifactSet>
  157. <filters>
  158. <filter>
  159. <artifact>*:*</artifact>
  160. <excludes>
  161. <exclude>META-INF/*.SF</exclude>
  162. <exclude>META-INF/*.DSA</exclude>
  163. <exclude>META-INF/*.RSA</exclude>
  164. <exclude>**/log4j.properties</exclude>
  165. </excludes>
  166. </filter>
  167. </filters>
  168. <transformers>
  169. <transformer
  170. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  171. <resource>reference.conf</resource>
  172. </transformer>
  173. <transformer
  174. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  175. <resource>
  176. META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
  177. </resource>
  178. </transformer>
  179. </transformers>
  180. </configuration>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. <plugin>
  185. <groupId>net.alchim31.maven</groupId>
  186. <artifactId>scala-maven-plugin</artifactId>
  187. <version>3.3.2</version>
  188. <executions>
  189. <execution>
  190. <id>scala-compile-first</id>
  191. <phase>process-resources</phase>
  192. <goals>
  193. <goal>compile</goal>
  194. </goals>
  195. </execution>
  196. <execution>
  197. <id>scala-test-compile-first</id>
  198. <phase>process-test-resources</phase>
  199. <goals>
  200. <goal>testCompile</goal>
  201. </goals>
  202. </execution>
  203. </executions>
  204. </plugin>
  205. <plugin>
  206. <groupId>org.apache.maven.plugins</groupId>
  207. <artifactId>maven-compiler-plugin</artifactId>
  208. <version>3.8.1</version>
  209. <configuration>
  210. <source>1.8</source>
  211. <target>1.8</target>
  212. <!--<compilerId>scala</compilerId>-->
  213. <!-- <compilerVersion>2.12.10</compilerVersion>-->
  214. </configuration>
  215. </plugin>
  216. </plugins>
  217. </build>
  218. </project>