pom.xml 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  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.1</version>
  42. </dependency>
  43. <dependency>
  44. <groupId>com.tzld.piaoquan</groupId>
  45. <artifactId>ad-engine-commons</artifactId>
  46. <version>1.0.0</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. </dependencies>
  114. <build>
  115. <plugins>
  116. <plugin>
  117. <groupId>org.apache.maven.plugins</groupId>
  118. <artifactId>maven-shade-plugin</artifactId>
  119. <version>3.2.4</version>
  120. <executions>
  121. <execution>
  122. <phase>package</phase>
  123. <goals>
  124. <goal>shade</goal>
  125. </goals>
  126. <configuration>
  127. <relocations>
  128. <relocation>
  129. <pattern>com.google.protobuf</pattern>
  130. <shadedPattern>shaded.com.google.protobuf</shadedPattern>
  131. </relocation>
  132. </relocations>
  133. <minimizeJar>false</minimizeJar>
  134. <shadedArtifactAttached>true</shadedArtifactAttached>
  135. <artifactSet>
  136. <includes>
  137. <!-- Include here the dependencies you
  138. want to be packed in your fat jar -->
  139. <include>*:*</include>
  140. </includes>
  141. </artifactSet>
  142. <filters>
  143. <filter>
  144. <artifact>*:*</artifact>
  145. <excludes>
  146. <exclude>META-INF/*.SF</exclude>
  147. <exclude>META-INF/*.DSA</exclude>
  148. <exclude>META-INF/*.RSA</exclude>
  149. <exclude>**/log4j.properties</exclude>
  150. </excludes>
  151. </filter>
  152. </filters>
  153. <transformers>
  154. <transformer
  155. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  156. <resource>reference.conf</resource>
  157. </transformer>
  158. <transformer
  159. implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
  160. <resource>
  161. META-INF/services/org.apache.spark.sql.sources.DataSourceRegister
  162. </resource>
  163. </transformer>
  164. </transformers>
  165. </configuration>
  166. </execution>
  167. </executions>
  168. </plugin>
  169. <plugin>
  170. <groupId>net.alchim31.maven</groupId>
  171. <artifactId>scala-maven-plugin</artifactId>
  172. <version>3.3.2</version>
  173. <executions>
  174. <execution>
  175. <id>scala-compile-first</id>
  176. <phase>process-resources</phase>
  177. <goals>
  178. <goal>compile</goal>
  179. </goals>
  180. </execution>
  181. <execution>
  182. <id>scala-test-compile-first</id>
  183. <phase>process-test-resources</phase>
  184. <goals>
  185. <goal>testCompile</goal>
  186. </goals>
  187. </execution>
  188. </executions>
  189. </plugin>
  190. <plugin>
  191. <groupId>org.apache.maven.plugins</groupId>
  192. <artifactId>maven-compiler-plugin</artifactId>
  193. <version>3.8.1</version>
  194. <configuration>
  195. <source>1.8</source>
  196. <target>1.8</target>
  197. <!--<compilerId>scala</compilerId>-->
  198. <!-- <compilerVersion>2.12.10</compilerVersion>-->
  199. </configuration>
  200. </plugin>
  201. </plugins>
  202. </build>
  203. </project>