/*
 * 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
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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.
 */

repositories {
  mavenCentral()
}

subprojects {
  repositories {
    mavenCentral()
    maven {
      url "https://repository.cloudera.com/artifactory/cloudera-repos/"
    }

    // Conjars is a read only repository that hosts older artifacts, necessary for hive 1.0.1 and hadoop 2.10
    maven {
        url "https://conjars.wensel.net/repo/"
        content {
          // Required for:
          //  com.linkedin.hive:hive-exec:1.0.1-avro > org.apache.calcite:calcite-core:0.9.2-incubating > net.hydromatic:linq4j:0.4
          //  com.linkedin.hive:hive-exec:1.0.1-avro > org.apache.calcite:calcite-core:0.9.2-incubating > net.hydromatic:quidem:0.1.1
          includeGroup "net.hydromatic"
          // Required for:
          //  com.linkedin.hive:hive-exec:1.0.1-avro > org.apache.calcite:calcite-core:0.9.2-incubating > eigenbase:eigenbase-properties:1.1.4.
          includeGroup "eigenbase"
          // Required for:
          //  org.apache.hadoop:hadoop-common:2.10.0 > org.apache.hadoop:hadoop-auth:2.10.0 > com.nimbusds:nimbus-jose-jwt:4.41.1 > net.minidev:json-smart:[1.3.1,2.3]
          includeGroup "net.minidev"
        }
    }
  }

  project.buildDir = new File(project.rootProject.buildDir, project.name)
}
