2018-01-27 00:48:30 -05:00
|
|
|
evaluationDependsOn(xpackModule('core'))
|
2018-01-20 00:30:17 -05:00
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.esplugin'
|
|
|
|
esplugin {
|
|
|
|
name 'x-pack-watcher'
|
|
|
|
description 'Elasticsearch Expanded Pack Plugin - Watcher'
|
|
|
|
classname 'org.elasticsearch.xpack.watcher.Watcher'
|
2018-01-21 11:00:51 -05:00
|
|
|
hasNativeController false
|
2018-01-25 08:33:30 -05:00
|
|
|
requiresKeystore false
|
2018-01-20 00:30:17 -05:00
|
|
|
extendedPlugins = ['x-pack-core']
|
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
|
|
|
|
archivesBaseName = 'x-pack-watcher'
|
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
ext.compactProfile = 'full'
|
|
|
|
|
|
|
|
compileJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-try,-unchecked"
|
|
|
|
|
2017-12-08 11:41:32 -05:00
|
|
|
dependencyLicenses {
|
|
|
|
mapping from: /owasp-java-html-sanitizer.*/, to: 'owasp-java-html-sanitizer'
|
2017-12-08 16:42:50 -05:00
|
|
|
ignoreSha 'x-pack-core'
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-02-09 14:30:43 -05:00
|
|
|
compileOnly "org.elasticsearch:elasticsearch:${version}"
|
2017-12-08 11:41:32 -05:00
|
|
|
|
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-02-09 14:30:43 -05:00
|
|
|
compileOnly project(path: ':modules:transport-netty4', configuration: 'runtime')
|
|
|
|
compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime')
|
2018-01-20 00:30:17 -05:00
|
|
|
|
2018-01-27 00:48:30 -05:00
|
|
|
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
|
2019-01-23 12:18:08 -05:00
|
|
|
testCompile "org.elasticsearch.plugin:x-pack-ilm:${version}"
|
2017-12-08 11:41:32 -05:00
|
|
|
|
|
|
|
// watcher deps
|
|
|
|
compile 'com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer:r239'
|
|
|
|
compile 'com.google.guava:guava:16.0.1' // needed by watcher for the html sanitizer and security tests for jimfs
|
2019-03-19 04:56:20 -04:00
|
|
|
compile 'com.sun.mail:jakarta.mail:1.6.3'
|
2017-12-08 11:41:32 -05:00
|
|
|
// HACK: java 9 removed javax.activation from the default modules, so instead of trying to add modules, which would have
|
|
|
|
// to be conditionalized for java 8/9, we pull in the classes directly
|
|
|
|
compile 'javax.activation:activation:1.1.1'
|
2018-02-09 14:30:43 -05:00
|
|
|
compileOnly "org.apache.httpcomponents:httpclient:${versions.httpclient}"
|
|
|
|
compileOnly "org.apache.httpcomponents:httpcore:${versions.httpcore}"
|
2017-12-08 11:41:32 -05:00
|
|
|
|
2018-01-20 00:30:17 -05:00
|
|
|
testCompile 'org.subethamail:subethasmtp:3.1.7'
|
|
|
|
// needed for subethasmtp, has @GuardedBy annotation
|
|
|
|
testCompile 'com.google.code.findbugs:jsr305:3.0.1'
|
2017-12-08 11:41:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// classes are missing, e.g. com.ibm.icu.lang.UCharacter
|
2019-01-07 10:24:19 -05:00
|
|
|
thirdPartyAudit {
|
|
|
|
ignoreViolations (
|
|
|
|
// uses internal java api: sun.misc.Unsafe
|
|
|
|
'com.google.common.cache.Striped64',
|
|
|
|
'com.google.common.cache.Striped64$1',
|
|
|
|
'com.google.common.cache.Striped64$Cell',
|
|
|
|
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator',
|
|
|
|
'com.google.common.primitives.UnsignedBytes$LexicographicalComparatorHolder$UnsafeComparator$1'
|
|
|
|
)
|
|
|
|
|
|
|
|
ignoreViolations(
|
|
|
|
'com.sun.activation.registries.LineTokenizer',
|
|
|
|
'com.sun.activation.registries.LogSupport',
|
|
|
|
'com.sun.activation.registries.MailcapFile',
|
|
|
|
'com.sun.activation.registries.MailcapTokenizer',
|
|
|
|
'com.sun.activation.registries.MimeTypeEntry',
|
|
|
|
'com.sun.activation.registries.MimeTypeFile',
|
|
|
|
'javax.activation.MailcapCommandMap',
|
|
|
|
'javax.activation.MimetypesFileTypeMap'
|
|
|
|
)
|
|
|
|
}
|
2017-12-08 11:41:32 -05:00
|
|
|
|
|
|
|
// pulled in as external dependency to work on java 9
|
2018-08-28 03:03:30 -04:00
|
|
|
if (project.runtimeJavaVersion <= JavaVersion.VERSION_1_8) {
|
2019-01-07 10:24:19 -05:00
|
|
|
thirdPartyAudit.ignoreJarHellWithJDK (
|
|
|
|
// pulled in as external dependency to work on java 9
|
|
|
|
'com.sun.activation.registries.LineTokenizer',
|
|
|
|
'com.sun.activation.registries.LogSupport',
|
|
|
|
'com.sun.activation.registries.MailcapFile',
|
|
|
|
'com.sun.activation.registries.MailcapTokenizer',
|
|
|
|
'com.sun.activation.registries.MimeTypeEntry',
|
|
|
|
'com.sun.activation.registries.MimeTypeFile',
|
|
|
|
'javax.activation.MailcapCommandMap',
|
|
|
|
'javax.activation.MimetypesFileTypeMap',
|
|
|
|
|
2017-12-08 11:41:32 -05:00
|
|
|
'com.sun.activation.registries.MailcapParseException',
|
|
|
|
'javax.activation.ActivationDataFlavor',
|
|
|
|
'javax.activation.CommandInfo',
|
|
|
|
'javax.activation.CommandMap',
|
|
|
|
'javax.activation.CommandObject',
|
|
|
|
'javax.activation.DataContentHandler',
|
|
|
|
'javax.activation.DataContentHandlerFactory',
|
|
|
|
'javax.activation.DataHandler$1',
|
|
|
|
'javax.activation.DataHandler',
|
|
|
|
'javax.activation.DataHandlerDataSource',
|
|
|
|
'javax.activation.DataSource',
|
|
|
|
'javax.activation.DataSourceDataContentHandler',
|
|
|
|
'javax.activation.FileDataSource',
|
|
|
|
'javax.activation.FileTypeMap',
|
|
|
|
'javax.activation.MimeType',
|
|
|
|
'javax.activation.MimeTypeParameterList',
|
|
|
|
'javax.activation.MimeTypeParseException',
|
|
|
|
'javax.activation.ObjectDataContentHandler',
|
|
|
|
'javax.activation.SecuritySupport$1',
|
|
|
|
'javax.activation.SecuritySupport$2',
|
|
|
|
'javax.activation.SecuritySupport$3',
|
|
|
|
'javax.activation.SecuritySupport$4',
|
|
|
|
'javax.activation.SecuritySupport$5',
|
|
|
|
'javax.activation.SecuritySupport',
|
|
|
|
'javax.activation.URLDataSource',
|
|
|
|
'javax.activation.UnsupportedDataTypeException'
|
2019-01-07 10:24:19 -05:00
|
|
|
)
|
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')
|
2018-01-20 00:30:17 -05:00
|
|
|
}
|
|
|
|
|
2018-12-19 01:25:20 -05:00
|
|
|
unitTest {
|
2018-01-20 00:30:17 -05:00
|
|
|
/*
|
|
|
|
* We have to disable setting the number of available processors as tests in the same JVM randomize processors and will step on each
|
|
|
|
* other if we allow them to set the number of available processors as it's set-once in Netty.
|
|
|
|
*/
|
|
|
|
systemProperty 'es.set.netty.runtime.available.processors', 'false'
|
|
|
|
}
|
|
|
|
|
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
|