pom.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ~ Licensed to the Apache Software Foundation (ASF) under one or more
  4. ~ contributor license agreements. See the NOTICE file distributed with
  5. ~ this work for additional information regarding copyright ownership.
  6. ~ The ASF licenses this file to You under the Apache License, Version 2.0
  7. ~ (the "License"); you may not use this file except in compliance with
  8. ~ the License. You may obtain a copy of the License at
  9. ~
  10. ~ http://www.apache.org/licenses/LICENSE-2.0
  11. ~
  12. ~ Unless required by applicable law or agreed to in writing, software
  13. ~ distributed under the License is distributed on an "AS IS" BASIS,
  14. ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. ~ See the License for the specific language governing permissions and
  16. ~ limitations under the License.
  17. -->
  18. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  19. <modelVersion>4.0.0</modelVersion>
  20. <parent>
  21. <groupId>org.apache.livy</groupId>
  22. <artifactId>livy-main</artifactId>
  23. <relativePath>../pom.xml</relativePath>
  24. <version>0.8.0-incubating-SNAPSHOT</version>
  25. </parent>
  26. <artifactId>livy-integration-test</artifactId>
  27. <version>0.8.0-incubating-SNAPSHOT</version>
  28. <packaging>jar</packaging>
  29. <properties>
  30. <!--
  31. Set this to the file containing the cluster description to use. By default a mini cluster
  32. with 1 DN and 1 NM will be run. Location is tried first in the classpath, then the file
  33. system.
  34. -->
  35. <cluster.spec>default</cluster.spec>
  36. <skipDeploy>true</skipDeploy>
  37. <livy.test.thrift.enabled>false</livy.test.thrift.enabled>
  38. </properties>
  39. <dependencies>
  40. <dependency>
  41. <groupId>${project.groupId}</groupId>
  42. <artifactId>livy-core_${scala.binary.version}</artifactId>
  43. <version>${project.version}</version>
  44. </dependency>
  45. <dependency>
  46. <groupId>${project.groupId}</groupId>
  47. <artifactId>livy-server</artifactId>
  48. <version>${project.version}</version>
  49. </dependency>
  50. <dependency>
  51. <groupId>${project.groupId}</groupId>
  52. <artifactId>livy-client-http</artifactId>
  53. <version>${project.version}</version>
  54. <scope>test</scope>
  55. </dependency>
  56. <dependency>
  57. <groupId>${project.groupId}</groupId>
  58. <artifactId>livy-test-lib</artifactId>
  59. <version>${project.version}</version>
  60. <scope>test</scope>
  61. </dependency>
  62. <dependency>
  63. <groupId>com.fasterxml.jackson.core</groupId>
  64. <artifactId>jackson-core</artifactId>
  65. </dependency>
  66. <dependency>
  67. <groupId>com.fasterxml.jackson.core</groupId>
  68. <artifactId>jackson-databind</artifactId>
  69. </dependency>
  70. <dependency>
  71. <groupId>com.fasterxml.jackson.module</groupId>
  72. <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.asynchttpclient</groupId>
  76. <artifactId>async-http-client</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>commons-io</groupId>
  80. <artifactId>commons-io</artifactId>
  81. <version>2.5</version>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.apache.hadoop</groupId>
  85. <artifactId>hadoop-common</artifactId>
  86. <classifier>tests</classifier>
  87. <exclusions>
  88. <exclusion>
  89. <groupId>org.apache.curator</groupId>
  90. <artifactId>curator-client</artifactId>
  91. </exclusion>
  92. <exclusion>
  93. <groupId>org.apache.zookeeper</groupId>
  94. <artifactId>zookeeper</artifactId>
  95. </exclusion>
  96. </exclusions>
  97. </dependency>
  98. <dependency>
  99. <groupId>org.apache.hadoop</groupId>
  100. <artifactId>hadoop-hdfs</artifactId>
  101. <classifier>tests</classifier>
  102. </dependency>
  103. <dependency>
  104. <groupId>org.apache.hadoop</groupId>
  105. <artifactId>hadoop-yarn-client</artifactId>
  106. </dependency>
  107. <dependency>
  108. <groupId>org.apache.hadoop</groupId>
  109. <artifactId>hadoop-client</artifactId>
  110. <exclusions>
  111. <exclusion>
  112. <groupId>javax.servlet</groupId>
  113. <artifactId>servlet-api</artifactId>
  114. </exclusion>
  115. </exclusions>
  116. </dependency>
  117. <dependency>
  118. <groupId>org.apache.hadoop</groupId>
  119. <artifactId>hadoop-yarn-server-tests</artifactId>
  120. <classifier>tests</classifier>
  121. <exclusions>
  122. <exclusion>
  123. <groupId>org.apache.zookeeper</groupId>
  124. <artifactId>zookeeper</artifactId>
  125. </exclusion>
  126. </exclusions>
  127. </dependency>
  128. <dependency>
  129. <groupId>org.apache.spark</groupId>
  130. <artifactId>spark-core_${scala.binary.version}</artifactId>
  131. <scope>test</scope>
  132. </dependency>
  133. <dependency>
  134. <groupId>org.apache.spark</groupId>
  135. <artifactId>spark-sql_${scala.binary.version}</artifactId>
  136. <scope>test</scope>
  137. </dependency>
  138. <dependency>
  139. <groupId>org.apache.spark</groupId>
  140. <artifactId>spark-streaming_${scala.binary.version}</artifactId>
  141. <scope>test</scope>
  142. </dependency>
  143. <dependency>
  144. <groupId>org.apache.spark</groupId>
  145. <artifactId>spark-hive_${scala.binary.version}</artifactId>
  146. <scope>test</scope>
  147. </dependency>
  148. <dependency>
  149. <groupId>org.scala-lang</groupId>
  150. <artifactId>scala-library</artifactId>
  151. </dependency>
  152. <dependency>
  153. <groupId>org.scalatest</groupId>
  154. <artifactId>scalatest_${scala.binary.version}</artifactId>
  155. <version>${scalatest.version}</version>
  156. <scope>compile</scope>
  157. </dependency>
  158. <dependency>
  159. <groupId>org.scalatra</groupId>
  160. <artifactId>scalatra-test_${scala.binary.version}</artifactId>
  161. </dependency>
  162. <!-- hadoop-common in test scope needs curator-client, but we want to use the proper version -->
  163. <dependency>
  164. <groupId>org.apache.curator</groupId>
  165. <artifactId>curator-client</artifactId>
  166. <version>${curator.version}</version>
  167. <exclusions>
  168. <exclusion>
  169. <groupId>org.apache.zookeeper</groupId>
  170. <artifactId>zookeeper</artifactId>
  171. </exclusion>
  172. </exclusions>
  173. </dependency>
  174. <!-- hadoop-common, hadoop-yarn-server-tests and curator needs zookeeper, but we want to use the proper version -->
  175. <dependency>
  176. <groupId>org.apache.zookeeper</groupId>
  177. <artifactId>zookeeper</artifactId>
  178. <version>${zookeeper.version}</version>
  179. </dependency>
  180. </dependencies>
  181. <build>
  182. <plugins>
  183. <plugin>
  184. <groupId>org.apache.maven.plugins</groupId>
  185. <artifactId>maven-antrun-plugin</artifactId>
  186. <version>1.6</version>
  187. <executions>
  188. <execution>
  189. <id>unpack-spark-files</id>
  190. <goals>
  191. <goal>run</goal>
  192. </goals>
  193. <phase>test-compile</phase>
  194. <configuration>
  195. <tasks>
  196. <echo message="unpack spark files" />
  197. <!-- <untar src="../spark-2.4.7-bin-hadoop2.7.tgz" compression="gzip" dest="${project.build.directory}" />-->
  198. <untar src="../spark-3.0.3-bin-hadoop3.2.tgz" compression="gzip" dest="${project.build.directory}" />
  199. </tasks>
  200. </configuration>
  201. </execution>
  202. </executions>
  203. </plugin>
  204. <plugin>
  205. <groupId>org.codehaus.mojo</groupId>
  206. <artifactId>build-helper-maven-plugin</artifactId>
  207. <executions>
  208. <execution>
  209. <id>parse-spark-version</id>
  210. <phase>process-test-sources</phase>
  211. <goals>
  212. <goal>parse-version</goal>
  213. </goals>
  214. <configuration>
  215. <propertyPrefix>spark</propertyPrefix>
  216. <versionString>${spark.version}</versionString>
  217. </configuration>
  218. </execution>
  219. <execution>
  220. <id>add-spark-version-specific-test</id>
  221. <phase>process-test-sources</phase>
  222. <goals>
  223. <goal>add-test-source</goal>
  224. </goals>
  225. <configuration>
  226. <sources>
  227. <source>${project.basedir}/src/test/spark${spark.majorVersion}/scala</source>
  228. </sources>
  229. </configuration>
  230. </execution>
  231. </executions>
  232. </plugin>
  233. <plugin>
  234. <groupId>org.apache.maven.plugins</groupId>
  235. <artifactId>maven-surefire-plugin</artifactId>
  236. <executions>
  237. <execution>
  238. <id>default-test</id>
  239. <phase>none</phase>
  240. </execution>
  241. </executions>
  242. </plugin>
  243. <plugin>
  244. <groupId>org.scalatest</groupId>
  245. <artifactId>scalatest-maven-plugin</artifactId>
  246. <executions>
  247. <!-- Unbind integration test from test phase and bind it to integration-test phase -->
  248. <execution>
  249. <id>test</id>
  250. <phase>none</phase>
  251. </execution>
  252. <execution>
  253. <id>integration-test</id>
  254. <phase>integration-test</phase>
  255. <goals>
  256. <goal>test</goal>
  257. </goals>
  258. </execution>
  259. </executions>
  260. <configuration>
  261. <environmentVariables>
  262. <LIVY_HOME>${execution.root}</LIVY_HOME>
  263. <LIVY_TEST>false</LIVY_TEST>
  264. <LIVY_INTEGRATION_TEST>true</LIVY_INTEGRATION_TEST>
  265. <SPARK_HOME>${project.build.directory}/${spark.bin.name}</SPARK_HOME>
  266. <LIVY_TEST_THRIFT_ENABLED>${livy.test.thrift.enabled}</LIVY_TEST_THRIFT_ENABLED>
  267. <PYSPARK_ROW_FIELD_SORTING_ENABLED>true</PYSPARK_ROW_FIELD_SORTING_ENABLED>
  268. </environmentVariables>
  269. <systemProperties>
  270. <cluster.spec>${cluster.spec}</cluster.spec>
  271. </systemProperties>
  272. <skipTests>${skipITs}</skipTests>
  273. </configuration>
  274. </plugin>
  275. </plugins>
  276. </build>
  277. <profiles>
  278. <profile>
  279. <id>skip-integration-test</id>
  280. <activation>
  281. <property>
  282. <name>skipITs</name>
  283. <value>true</value>
  284. </property>
  285. </activation>
  286. </profile>
  287. <profile>
  288. <id>thriftserver</id>
  289. <properties>
  290. <livy.test.thrift.enabled>true</livy.test.thrift.enabled>
  291. </properties>
  292. <dependencies>
  293. <dependency>
  294. <groupId>${project.groupId}</groupId>
  295. <artifactId>livy-thriftserver</artifactId>
  296. <version>${project.version}</version>
  297. </dependency>
  298. <!-- needed for testing thriftserver -->
  299. <dependency>
  300. <groupId>org.apache.hive</groupId>
  301. <artifactId>hive-jdbc</artifactId>
  302. <version>${hive.version}</version>
  303. <scope>test</scope>
  304. <exclusions>
  305. <exclusion>
  306. <groupId>org.apache.zookeeper</groupId>
  307. <artifactId>zookeeper</artifactId>
  308. </exclusion>
  309. <exclusion>
  310. <groupId>io.netty</groupId>
  311. <artifactId>netty</artifactId>
  312. </exclusion>
  313. <exclusion>
  314. <groupId>org.apache.logging.log4j</groupId>
  315. <artifactId>log4j-slf4j-impl</artifactId>
  316. </exclusion>
  317. <exclusion>
  318. <groupId>org.slf4j</groupId>
  319. <artifactId>slf4j-log4j12</artifactId>
  320. </exclusion>
  321. <exclusion>
  322. <groupId>org.apache.hbase</groupId>
  323. <artifactId>*</artifactId>
  324. </exclusion>
  325. </exclusions>
  326. </dependency>
  327. </dependencies>
  328. <build>
  329. <plugins>
  330. <plugin>
  331. <groupId>org.codehaus.mojo</groupId>
  332. <artifactId>build-helper-maven-plugin</artifactId>
  333. <executions>
  334. <execution>
  335. <id>add-scala-sources</id>
  336. <phase>generate-sources</phase>
  337. <goals>
  338. <goal>add-source</goal>
  339. </goals>
  340. <configuration>
  341. <sources>
  342. <source>${project.basedir}/src/thriftserver/main/scala</source>
  343. </sources>
  344. </configuration>
  345. </execution>
  346. <execution>
  347. <id>add-scala-test-sources</id>
  348. <phase>generate-test-sources</phase>
  349. <goals>
  350. <goal>add-test-source</goal>
  351. </goals>
  352. <configuration>
  353. <sources>
  354. <source>${project.basedir}/src/thriftserver/test/scala</source>
  355. </sources>
  356. </configuration>
  357. </execution>
  358. </executions>
  359. </plugin>
  360. </plugins>
  361. </build>
  362. </profile>
  363. </profiles>
  364. </project>