/* * 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. */ apply plugin: 'java-library' description = 'Hadoop Authentication Module' dependencies { // Spotbugs Annotations are only needed for old findbugs // annotation usage like in Zookeeper during compilation time. // It is not included in the release so exclude from checks. testCompileOnly 'com.github.spotbugs:spotbugs-annotations' permitUnusedDeclared 'com.github.spotbugs:spotbugs-annotations' // Exclude these from jar validation and license checks. configurations.jarValidation { exclude group: "com.github.spotbugs", module: "spotbugs-annotations" } implementation project(':solr:core') implementation project(':solr:solrj') implementation project(':solr:solrj-zookeeper') implementation 'org.slf4j:slf4j-api' api 'org.eclipse.jetty.toolchain:jetty-servlet-api' implementation 'com.fasterxml.jackson.core:jackson-core' implementation 'com.google.guava:guava' implementation 'io.dropwizard.metrics:metrics-core' implementation 'org.apache.httpcomponents:httpclient' implementation 'org.apache.httpcomponents:httpcore' implementation 'org.eclipse.jetty:jetty-client' // ZooKeeper & Curator implementation('org.apache.zookeeper:zookeeper', { exclude group: "org.apache.yetus", module: "audience-annotations" }) implementation ('org.apache.zookeeper:zookeeper-jute') { exclude group: 'org.apache.yetus', module: 'audience-annotations' } // required for instantiating a Zookeeper server (for embedding ZK or running tests) runtimeOnly 'org.xerial.snappy:snappy-java' implementation 'org.apache.curator:curator-client' implementation 'org.apache.curator:curator-framework' runtimeOnly 'org.apache.curator:curator-recipes' // Hadoop auth framework implementation 'org.apache.hadoop:hadoop-annotations' permitUnusedDeclared 'org.apache.hadoop:hadoop-annotations' implementation ('org.apache.hadoop:hadoop-auth') { transitive = false } implementation ('org.apache.hadoop:hadoop-common') { transitive = false } // transitive of hadoop-common; used by Kerberos auth runtimeOnly 'org.apache.hadoop.thirdparty:hadoop-shaded-guava' runtimeOnly 'commons-collections:commons-collections' runtimeOnly 'com.google.re2j:re2j' runtimeOnly 'org.apache.commons:commons-configuration2' runtimeOnly 'org.apache.kerby:kerb-core' runtimeOnly 'org.apache.kerby:kerb-util' testImplementation project(':solr:test-framework') testImplementation 'org.apache.lucene:lucene-test-framework' testImplementation 'com.carrotsearch.randomizedtesting:randomizedtesting-runner' testImplementation 'junit:junit' testImplementation 'org.hamcrest:hamcrest' testImplementation('org.mockito:mockito-core', { exclude group: "net.bytebuddy", module: "byte-buddy-agent" }) testRuntimeOnly('org.mockito:mockito-subclass', { exclude group: "net.bytebuddy", module: "byte-buddy-agent" }) testImplementation 'commons-io:commons-io' testImplementation 'org.apache.lucene:lucene-core' testImplementation project(':solr:solrj') // classes like solr.ICUCollationField, used by TestSolrCloudWithSecureImpersonation for example. testRuntimeOnly project(':solr:modules:analysis-extras') // Hadoop MiniKdc Dependencies (for Kerberos auth tests) testImplementation ('org.apache.hadoop:hadoop-minikdc', { exclude group:'org.apache.kerby', module:'kerby-xdr' exclude group:'org.apache.kerby', module:'token-provider' exclude group:'org.slf4j', module:'slf4j-reload4j' exclude group:'org.jline', module:'jline' exclude group:'com.jcraft', module:'jsch' }) // Zookeeper dependency - some tests like HdfsCloudBackupRestore need this testImplementation('org.apache.zookeeper:zookeeper', { exclude group: "org.apache.yetus", module: "audience-annotations" }) // required for instantiating a Zookeeper server in tests or embedded testRuntimeOnly ('org.xerial.snappy:snappy-java') } // Copy all the test resource files from core to the build/resources/test directory // of the Hadoop Authentication module so we can avoid duplication of the test // resource files like schemas and SolrConfigs. This can be improved later by making // the test classes load the resources from core directories directly. tasks.register('copySolrCoreTestResources', Copy) { from(project(':solr:core').sourceSets.test.resources.srcDirs) { exclude '**/*.java' } into sourceSets.test.output.resourcesDir } tasks.named('processTestResources').configure { dependsOn copySolrCoreTestResources }