aboutsummaryrefslogtreecommitdiff
path: root/bigtop-tests/smoke-tests/odpi-runtime/build.gradle
blob: 97e3635398691d616b12379a9248f43bfd170e24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
def junitVersion = '4.11'

apply plugin: 'java'

repositories {
  maven {
    url "http://conjars.org/repo/"
  }
}
dependencies {
  compile group: 'junit', name: 'junit', version: junitVersion, transitive: 'true'
  compile group: 'commons-logging', name: 'commons-logging', version: '1.1.3'
  compile group: 'org.apache.commons', name: 'commons-exec', version: '1.3'
  compile group: 'org.apache.hive', name: 'hive-jdbc', version: '1.2.1'
  compile group: 'org.apache.hive', name: 'hive-metastore', version: '1.2.1'
  compile group: 'org.apache.hive', name: 'hive-common', version: '1.2.1'
  compile group: 'org.apache.thrift', name: 'libfb303', version: '0.9.3'
  compile group: 'org.apache.thrift', name: 'libthrift', version: '0.9.3'
  compile group: 'org.apache.hadoop', name: 'hadoop-common', version: '2.7.2'
  compile group: 'org.apache.hive.hcatalog', name: 'hive-hcatalog-core', version: '1.2.1'
  testCompile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-core', version: '2.7.2'
  compile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-jobclient', version: '2.7.2'
  testCompile group: 'org.apache.hadoop', name: 'hadoop-mapreduce-client-common', version: '2.7.2'
  testCompile group: 'org.apache.hadoop', name: 'hadoop-hdfs', version: '2.7.2'
  testCompile group: 'org.apache.hive', name: 'hive-exec', version: '1.2.1'
  testCompile "junit:junit:4.11"
  if (System.env.HADOOP_CONF_DIR) testRuntime files(System.env.HADOOP_CONF_DIR)
}

jar {
    from {
        (configurations.runtime).grep{it.toString() =~ /(hive|libfb303)-.*[jw]ar$/}.collect {
              zipTree(it)
        }
    }

    exclude 'META-INF/*.RSA', 'META-INF/*.SF','META-INF/*.DSA'
}

test {
  // Change the default location where test data is picked up
  systemProperty 'test.resources.dir', "${buildDir}/resources/test/"
  systemProperty 'odpi.test.hive.hcat.job.jar', jar.archivePath
  systemProperty 'odpi.test.hive.hcat.core.jar', (configurations.runtime).find { it.toString() =~ /hive-hcatalog-core-.*jar$/ }
}
test.dependsOn jar