pom.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  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-3.1.3-bin-hadoop3.2.tgz" compression="gzip" dest="${project.build.directory}" />
  198. </tasks>
  199. </configuration>
  200. </execution>
  201. </executions>
  202. </plugin>
  203. <plugin>
  204. <groupId>org.codehaus.mojo</groupId>
  205. <artifactId>build-helper-maven-plugin</artifactId>
  206. <executions>
  207. <execution>
  208. <id>parse-spark-version</id>
  209. <phase>process-test-sources</phase>
  210. <goals>
  211. <goal>parse-version</goal>
  212. </goals>
  213. <configuration>
  214. <propertyPrefix>spark</propertyPrefix>
  215. <versionString>${spark.version}</versionString>
  216. </configuration>
  217. </execution>
  218. <execution>
  219. <id>add-spark-version-specific-test</id>
  220. <phase>process-test-sources</phase>
  221. <goals>
  222. <goal>add-test-source</goal>
  223. </goals>
  224. <configuration>
  225. <sources>
  226. <source>${project.basedir}/src/test/spark${spark.majorVersion}/scala</source>
  227. </sources>
  228. </configuration>
  229. </execution>
  230. </executions>
  231. </plugin>
  232. <plugin>
  233. <groupId>org.apache.maven.plugins</groupId>
  234. <artifactId>maven-surefire-plugin</artifactId>
  235. <executions>
  236. <execution>
  237. <id>default-test</id>
  238. <phase>none</phase>
  239. </execution>
  240. </executions>
  241. </plugin>
  242. <plugin>
  243. <groupId>org.scalatest</groupId>
  244. <artifactId>scalatest-maven-plugin</artifactId>
  245. <executions>
  246. <!-- Unbind integration test from test phase and bind it to integration-test phase -->
  247. <execution>
  248. <id>test</id>
  249. <phase>none</phase>
  250. </execution>
  251. <execution>
  252. <id>integration-test</id>
  253. <phase>integration-test</phase>
  254. <goals>
  255. <goal>test</goal>
  256. </goals>
  257. </execution>
  258. </executions>
  259. <configuration>
  260. <environmentVariables>
  261. <LIVY_HOME>${execution.root}</LIVY_HOME>
  262. <LIVY_TEST>false</LIVY_TEST>
  263. <LIVY_INTEGRATION_TEST>true</LIVY_INTEGRATION_TEST>
  264. <SPARK_HOME>${project.build.directory}/${spark.bin.name}</SPARK_HOME>
  265. <LIVY_TEST_THRIFT_ENABLED>${livy.test.thrift.enabled}</LIVY_TEST_THRIFT_ENABLED>
  266. <PYSPARK_ROW_FIELD_SORTING_ENABLED>true</PYSPARK_ROW_FIELD_SORTING_ENABLED>
  267. </environmentVariables>
  268. <systemProperties>
  269. <cluster.spec>${cluster.spec}</cluster.spec>
  270. </systemProperties>
  271. <skipTests>${skipITs}</skipTests>
  272. </configuration>
  273. </plugin>
  274. </plugins>
  275. </build>
  276. <profiles>
  277. <profile>
  278. <id>skip-integration-test</id>
  279. <activation>
  280. <property>
  281. <name>skipITs</name>
  282. <value>true</value>
  283. </property>
  284. </activation>
  285. </profile>
  286. <profile>
  287. <id>thriftserver</id>
  288. <properties>
  289. <livy.test.thrift.enabled>true</livy.test.thrift.enabled>
  290. </properties>
  291. <dependencies>
  292. <dependency>
  293. <groupId>${project.groupId}</groupId>
  294. <artifactId>livy-thriftserver</artifactId>
  295. <version>${project.version}</version>
  296. </dependency>
  297. <!-- needed for testing thriftserver -->
  298. <dependency>
  299. <groupId>org.apache.hive</groupId>
  300. <artifactId>hive-jdbc</artifactId>
  301. <version>${hive.version}</version>
  302. <scope>test</scope>
  303. <exclusions>
  304. <exclusion>
  305. <groupId>org.apache.zookeeper</groupId>
  306. <artifactId>zookeeper</artifactId>
  307. </exclusion>
  308. <exclusion>
  309. <groupId>io.netty</groupId>
  310. <artifactId>netty</artifactId>
  311. </exclusion>
  312. <exclusion>
  313. <groupId>org.apache.logging.log4j</groupId>
  314. <artifactId>log4j-slf4j-impl</artifactId>
  315. </exclusion>
  316. <exclusion>
  317. <groupId>org.slf4j</groupId>
  318. <artifactId>slf4j-log4j12</artifactId>
  319. </exclusion>
  320. <exclusion>
  321. <groupId>org.apache.hbase</groupId>
  322. <artifactId>*</artifactId>
  323. </exclusion>
  324. </exclusions>
  325. </dependency>
  326. </dependencies>
  327. <build>
  328. <plugins>
  329. <plugin>
  330. <groupId>org.codehaus.mojo</groupId>
  331. <artifactId>build-helper-maven-plugin</artifactId>
  332. <executions>
  333. <execution>
  334. <id>add-scala-sources</id>
  335. <phase>generate-sources</phase>
  336. <goals>
  337. <goal>add-source</goal>
  338. </goals>
  339. <configuration>
  340. <sources>
  341. <source>${project.basedir}/src/thriftserver/main/scala</source>
  342. </sources>
  343. </configuration>
  344. </execution>
  345. <execution>
  346. <id>add-scala-test-sources</id>
  347. <phase>generate-test-sources</phase>
  348. <goals>
  349. <goal>add-test-source</goal>
  350. </goals>
  351. <configuration>
  352. <sources>
  353. <source>${project.basedir}/src/thriftserver/test/scala</source>
  354. </sources>
  355. </configuration>
  356. </execution>
  357. </executions>
  358. </plugin>
  359. </plugins>
  360. </build>
  361. </profile>
  362. </profiles>
  363. </project>