2016-02-29 16:01:39 -05:00
|
|
|
import org.elasticsearch.gradle.LoggedExec
|
2015-10-29 14:40:19 -04:00
|
|
|
|
|
|
|
esplugin {
|
|
|
|
description 'The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.'
|
|
|
|
classname 'org.elasticsearch.plugin.discovery.gce.GceDiscoveryPlugin'
|
|
|
|
}
|
|
|
|
|
2015-11-10 17:58:46 -05:00
|
|
|
versions << [
|
|
|
|
'google': '1.20.0'
|
|
|
|
]
|
|
|
|
|
2015-10-29 14:40:19 -04:00
|
|
|
dependencies {
|
2015-11-10 17:58:46 -05:00
|
|
|
compile "com.google.apis:google-api-services-compute:v1-rev71-${versions.google}"
|
|
|
|
compile "com.google.api-client:google-api-client:${versions.google}"
|
|
|
|
compile "com.google.oauth-client:google-oauth-client:${versions.google}"
|
|
|
|
compile "com.google.http-client:google-http-client:${versions.google}"
|
|
|
|
compile "com.google.http-client:google-http-client-jackson2:${versions.google}"
|
|
|
|
compile 'com.google.code.findbugs:jsr305:1.3.9'
|
2015-10-29 14:40:19 -04:00
|
|
|
compile "org.apache.httpcomponents:httpclient:${versions.httpclient}"
|
2015-11-10 17:58:46 -05:00
|
|
|
compile "org.apache.httpcomponents:httpcore:${versions.httpcore}"
|
|
|
|
compile "commons-logging:commons-logging:${versions.commonslogging}"
|
|
|
|
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
2015-10-29 14:40:19 -04:00
|
|
|
}
|
|
|
|
|
2016-02-29 16:01:39 -05:00
|
|
|
|
|
|
|
// needed to be consistent with ssl host checking
|
|
|
|
String host = InetAddress.getLoopbackAddress().getHostAddress();
|
|
|
|
|
|
|
|
// location of keystore and files to generate it
|
|
|
|
File keystore = new File(project.buildDir, 'keystore/test-node.jks')
|
|
|
|
|
|
|
|
// generate the keystore
|
|
|
|
task createKey(type: LoggedExec) {
|
|
|
|
doFirst {
|
|
|
|
project.delete(keystore.parentFile)
|
|
|
|
keystore.parentFile.mkdirs()
|
|
|
|
}
|
2016-11-14 07:21:32 -05:00
|
|
|
executable = new File(project.javaHome, 'bin/keytool')
|
2016-02-29 16:01:39 -05:00
|
|
|
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
|
|
|
args '-genkey',
|
|
|
|
'-alias', 'test-node',
|
|
|
|
'-keystore', keystore,
|
|
|
|
'-keyalg', 'RSA',
|
|
|
|
'-keysize', '2048',
|
|
|
|
'-validity', '712',
|
|
|
|
'-dname', 'CN=' + host,
|
|
|
|
'-keypass', 'keypass',
|
|
|
|
'-storepass', 'keypass'
|
|
|
|
}
|
|
|
|
|
|
|
|
// add keystore to test classpath: it expects it there
|
|
|
|
sourceSets.test.resources.srcDir(keystore.parentFile)
|
|
|
|
processTestResources.dependsOn(createKey)
|
|
|
|
|
2015-10-29 14:40:19 -04:00
|
|
|
dependencyLicenses {
|
|
|
|
mapping from: /google-.*/, to: 'google'
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
// this is needed for insecure plugins, remove if possible!
|
|
|
|
systemProperty 'tests.artifact', project.name
|
|
|
|
}
|
2015-12-16 16:38:16 -05:00
|
|
|
|
2015-12-28 22:38:55 -05:00
|
|
|
thirdPartyAudit.excludes = [
|
|
|
|
// classes are missing
|
|
|
|
'com.google.common.base.Splitter',
|
|
|
|
'com.google.common.collect.Lists',
|
|
|
|
'javax.servlet.ServletContextEvent',
|
|
|
|
'javax.servlet.ServletContextListener',
|
|
|
|
'org.apache.avalon.framework.logger.Logger',
|
|
|
|
'org.apache.log.Hierarchy',
|
|
|
|
'org.apache.log.Logger',
|
|
|
|
]
|