2018-01-25 04:38:34 -05:00
|
|
|
import com.carrotsearch.gradle.junit4.RandomizedTestingTask
|
|
|
|
|
2018-01-27 00:48:30 -05:00
|
|
|
evaluationDependsOn(xpackModule('core'))
|
2018-01-22 10:55:03 -05:00
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
|
|
esplugin {
|
|
|
|
name 'x-pack-monitoring'
|
|
|
|
description 'Elasticsearch Expanded Pack Plugin - Monitoring'
|
|
|
|
classname 'org.elasticsearch.xpack.monitoring.Monitoring'
|
|
|
|
extendedPlugins = ['x-pack-core']
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
archivesBaseName = 'x-pack-monitoring'
|
|
|
|
|
|
|
|
dependencies {
|
2018-08-21 20:03:28 -04:00
|
|
|
// "org.elasticsearch.plugin:x-pack-core:${version}" doesn't work with idea because the testArtifacts are also here
|
|
|
|
compileOnly project(path: xpackModule('core'), configuration: 'default')
|
2018-01-27 00:48:30 -05:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2017-12-08 11:41:32 -05:00
|
|
|
|
|
|
|
// monitoring deps
|
|
|
|
compile "org.elasticsearch.client:elasticsearch-rest-client:${version}"
|
|
|
|
compile "org.elasticsearch.client:elasticsearch-rest-client-sniffer:${version}"
|
2018-01-20 00:30:17 -05:00
|
|
|
|
|
|
|
// baz - this goes away after we separate out the actions #27759
|
|
|
|
testCompile "org.elasticsearch.plugin:x-pack-watcher:${version}"
|
2019-02-21 23:42:53 -05:00
|
|
|
|
|
|
|
testCompile "org.elasticsearch.plugin:x-pack-ilm:${version}"
|
2018-01-20 00:30:17 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
testArtifacts.extendsFrom testRuntime
|
|
|
|
}
|
|
|
|
task testJar(type: Jar) {
|
|
|
|
appendix 'test'
|
|
|
|
from sourceSets.test.output
|
|
|
|
}
|
|
|
|
artifacts {
|
|
|
|
// normal es plugins do not publish the jar but we need to since users need it for Transport Clients and extensions
|
|
|
|
archives jar
|
|
|
|
testArtifacts testJar
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencyLicenses {
|
2017-12-08 16:42:50 -05:00
|
|
|
mapping from: /http.*/, to: 'httpclient' // pulled in by rest client
|
|
|
|
mapping from: /commons-.*/, to: 'commons' // pulled in by rest client
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
run {
|
2018-01-27 00:48:30 -05:00
|
|
|
plugin xpackModule('core')
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
2018-01-25 04:38:34 -05:00
|
|
|
|
|
|
|
// xpack modules are installed in real clusters as the meta plugin, so
|
|
|
|
// installing them as individual plugins for integ tests doesn't make sense,
|
|
|
|
// so we disable integ tests
|
|
|
|
integTest.enabled = false
|
|
|
|
|
|
|
|
// Instead we create a separate task to run the
|
|
|
|
// tests based on ESIntegTestCase
|
|
|
|
task internalClusterTest(type: RandomizedTestingTask,
|
|
|
|
group: JavaBasePlugin.VERIFICATION_GROUP,
|
|
|
|
description: 'Multi-node tests',
|
2018-12-19 01:25:20 -05:00
|
|
|
dependsOn: unitTest.dependsOn) {
|
2018-01-25 04:38:34 -05:00
|
|
|
include '**/*IT.class'
|
|
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
|
|
|
}
|
2018-12-06 17:13:49 -05:00
|
|
|
check.dependsOn internalClusterTest
|
|
|
|
internalClusterTest.mustRunAfter test
|
2018-01-25 04:38:34 -05:00
|
|
|
|
|
|
|
// also add an "alias" task to make typing on the command line easier task icTest {
|
|
|
|
task icTest {
|
|
|
|
dependsOn internalClusterTest
|
|
|
|
}
|