2015-10-30 02:40:19 +08:00
|
|
|
/*
|
2021-02-03 05:41:39 +08:00
|
|
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
|
|
* or more contributor license agreements. Licensed under the Elastic License
|
|
|
|
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
|
|
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
|
|
* Side Public License, v 1.
|
2015-10-30 02:40:19 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
apply plugin: 'elasticsearch.build'
|
|
|
|
apply plugin: 'nebula.optional-base'
|
2020-05-15 09:56:59 +08:00
|
|
|
apply plugin: 'elasticsearch.publish'
|
2020-05-07 08:20:26 +08:00
|
|
|
apply plugin: 'elasticsearch.internal-cluster-test'
|
2016-05-06 08:53:01 +08:00
|
|
|
|
|
|
|
publishing {
|
|
|
|
publications {
|
2021-02-18 19:15:59 +08:00
|
|
|
elastic {
|
2016-05-06 08:53:01 +08:00
|
|
|
artifactId 'elasticsearch'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-10-30 02:40:19 +08:00
|
|
|
|
2016-03-18 04:35:16 +08:00
|
|
|
archivesBaseName = 'elasticsearch'
|
2015-10-30 02:40:19 +08:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
2020-06-30 15:37:09 +08:00
|
|
|
api project(':libs:elasticsearch-core')
|
|
|
|
api project(':libs:elasticsearch-secure-sm')
|
|
|
|
api project(':libs:elasticsearch-x-content')
|
|
|
|
api project(":libs:elasticsearch-geo")
|
2021-09-10 02:53:35 +08:00
|
|
|
api project(":libs:elasticsearch-lz4")
|
2019-10-03 15:50:46 +08:00
|
|
|
|
2020-11-10 03:41:49 +08:00
|
|
|
implementation project(':libs:elasticsearch-plugin-classloader')
|
2018-01-04 03:12:43 +08:00
|
|
|
|
2015-10-30 02:40:19 +08:00
|
|
|
// lucene
|
2020-06-30 15:37:09 +08:00
|
|
|
api "org.apache.lucene:lucene-core:${versions.lucene}"
|
2021-09-21 17:48:26 +08:00
|
|
|
api "org.apache.lucene:lucene-analysis-common:${versions.lucene}"
|
2020-06-30 15:37:09 +08:00
|
|
|
api "org.apache.lucene:lucene-backward-codecs:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-grouping:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-highlighter:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-join:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-memory:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-misc:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-queries:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-queryparser:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-sandbox:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-spatial3d:${versions.lucene}"
|
|
|
|
api "org.apache.lucene:lucene-suggest:${versions.lucene}"
|
2015-10-30 02:40:19 +08:00
|
|
|
|
|
|
|
// utilities
|
2020-06-30 15:37:09 +08:00
|
|
|
api project(":libs:elasticsearch-cli")
|
|
|
|
api 'com.carrotsearch:hppc:0.8.1'
|
2015-10-30 02:40:19 +08:00
|
|
|
|
|
|
|
// percentiles aggregation
|
2020-06-30 15:37:09 +08:00
|
|
|
api 'com.tdunning:t-digest:3.2'
|
2015-10-30 02:40:19 +08:00
|
|
|
// precentil ranks aggregation
|
2020-06-30 15:37:09 +08:00
|
|
|
api 'org.hdrhistogram:HdrHistogram:2.1.9'
|
2015-10-30 02:40:19 +08:00
|
|
|
|
|
|
|
// logging
|
2020-06-30 15:37:09 +08:00
|
|
|
api "org.apache.logging.log4j:log4j-api:${versions.log4j}"
|
|
|
|
api "org.apache.logging.log4j:log4j-core:${versions.log4j}", optional
|
2015-10-30 02:40:19 +08:00
|
|
|
|
2017-04-13 15:17:50 +08:00
|
|
|
// repackaged jna with native bits linked against all elastic supported platforms
|
2020-06-30 15:37:09 +08:00
|
|
|
api "org.elasticsearch:jna:${versions.jna}"
|
2015-10-30 02:40:19 +08:00
|
|
|
|
2020-06-30 15:37:09 +08:00
|
|
|
api "co.elastic.logging:log4j2-ecs-layout:${versions.ecsLogging}"
|
|
|
|
api "co.elastic.logging:ecs-logging-core:${versions.ecsLogging}"
|
2020-03-31 14:40:32 +08:00
|
|
|
|
2020-06-12 19:34:53 +08:00
|
|
|
testImplementation(project(":test:framework")) {
|
2019-10-03 15:50:46 +08:00
|
|
|
// tests use the locally compiled version of server
|
|
|
|
exclude group: 'org.elasticsearch', module: 'server'
|
2015-11-05 14:28:57 +08:00
|
|
|
}
|
2020-06-12 19:34:53 +08:00
|
|
|
internalClusterTestImplementation(project(":test:framework")) {
|
2020-05-07 08:20:26 +08:00
|
|
|
exclude group: 'org.elasticsearch', module: 'server'
|
|
|
|
}
|
2015-11-05 14:28:57 +08:00
|
|
|
|
2015-10-30 02:40:19 +08:00
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
tasks.named("forbiddenPatterns").configure {
|
|
|
|
exclude '**/*.json'
|
|
|
|
exclude '**/*.jmx'
|
|
|
|
exclude '**/*.dic'
|
|
|
|
exclude '**/*.binary'
|
|
|
|
exclude '**/*.st'
|
2015-10-30 02:40:19 +08:00
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
tasks.named("testingConventions").configure {
|
|
|
|
naming.clear()
|
|
|
|
naming {
|
|
|
|
Tests {
|
|
|
|
baseClass "org.apache.lucene.util.LuceneTestCase"
|
|
|
|
}
|
|
|
|
IT {
|
|
|
|
baseClass "org.elasticsearch.test.ESIntegTestCase"
|
|
|
|
baseClass "org.elasticsearch.test.ESSingleNodeTestCase"
|
|
|
|
}
|
2019-01-08 19:39:03 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
def generateModulesList = tasks.register("generateModulesList") {
|
|
|
|
List<String> modules = project(':modules').subprojects.collect { it.name }
|
|
|
|
modules.add('x-pack')
|
|
|
|
File modulesFile = new File(buildDir, 'generated-resources/modules.txt')
|
|
|
|
processResources.from(modulesFile)
|
|
|
|
inputs.property('modules', modules)
|
|
|
|
outputs.file(modulesFile)
|
|
|
|
doLast {
|
|
|
|
modulesFile.parentFile.mkdirs()
|
|
|
|
modulesFile.setText(modules.join('\n'), 'UTF-8')
|
|
|
|
}
|
2016-05-26 04:31:04 +08:00
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
def generatePluginsList = tasks.register("generatePluginsList") {
|
|
|
|
Set<String> plugins = new TreeSet<>(project(':plugins').childProjects.keySet())
|
|
|
|
plugins.remove('example')
|
|
|
|
|
|
|
|
File pluginsFile = new File(buildDir, 'generated-resources/plugins.txt')
|
|
|
|
processResources.from(pluginsFile)
|
|
|
|
inputs.property('plugins', plugins)
|
|
|
|
outputs.file(pluginsFile)
|
|
|
|
doLast {
|
|
|
|
pluginsFile.parentFile.mkdirs()
|
|
|
|
pluginsFile.setText(plugins.join('\n'), 'UTF-8')
|
|
|
|
}
|
2016-05-26 04:31:04 +08:00
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
tasks.named("processResources").configure {
|
|
|
|
dependsOn generateModulesList, generatePluginsList
|
2016-05-26 04:31:04 +08:00
|
|
|
}
|
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
tasks.named("thirdPartyAudit").configure {
|
|
|
|
ignoreMissingClasses(
|
|
|
|
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
|
|
|
'com.fasterxml.jackson.databind.ObjectMapper',
|
|
|
|
|
|
|
|
// from log4j
|
|
|
|
'com.conversantmedia.util.concurrent.DisruptorBlockingQueue',
|
|
|
|
'com.conversantmedia.util.concurrent.SpinPolicy',
|
|
|
|
'com.fasterxml.jackson.databind.SerializationFeature',
|
|
|
|
'com.fasterxml.jackson.annotation.JsonInclude$Include',
|
|
|
|
'com.fasterxml.jackson.databind.DeserializationContext',
|
|
|
|
'com.fasterxml.jackson.databind.DeserializationFeature',
|
|
|
|
'com.fasterxml.jackson.databind.JsonMappingException',
|
|
|
|
'com.fasterxml.jackson.databind.JsonNode',
|
|
|
|
'com.fasterxml.jackson.databind.Module$SetupContext',
|
|
|
|
'com.fasterxml.jackson.databind.ObjectReader',
|
|
|
|
'com.fasterxml.jackson.databind.ObjectWriter',
|
|
|
|
'com.fasterxml.jackson.databind.SerializerProvider',
|
|
|
|
'com.fasterxml.jackson.databind.deser.std.StdDeserializer',
|
|
|
|
'com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer',
|
|
|
|
'com.fasterxml.jackson.databind.module.SimpleModule',
|
|
|
|
'com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter',
|
|
|
|
'com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider',
|
|
|
|
'com.fasterxml.jackson.databind.ser.std.StdScalarSerializer',
|
|
|
|
'com.fasterxml.jackson.databind.ser.std.StdSerializer',
|
|
|
|
'com.fasterxml.jackson.dataformat.xml.JacksonXmlModule',
|
|
|
|
'com.fasterxml.jackson.dataformat.xml.XmlMapper',
|
|
|
|
'com.fasterxml.jackson.dataformat.xml.util.DefaultXmlPrettyPrinter',
|
|
|
|
'org.fusesource.jansi.Ansi',
|
|
|
|
'org.fusesource.jansi.AnsiRenderer$Code',
|
|
|
|
'com.lmax.disruptor.BlockingWaitStrategy',
|
|
|
|
'com.lmax.disruptor.BusySpinWaitStrategy',
|
|
|
|
'com.lmax.disruptor.EventFactory',
|
|
|
|
'com.lmax.disruptor.EventTranslator',
|
|
|
|
'com.lmax.disruptor.EventTranslatorTwoArg',
|
|
|
|
'com.lmax.disruptor.EventTranslatorVararg',
|
|
|
|
'com.lmax.disruptor.ExceptionHandler',
|
|
|
|
'com.lmax.disruptor.LifecycleAware',
|
|
|
|
'com.lmax.disruptor.RingBuffer',
|
|
|
|
'com.lmax.disruptor.Sequence',
|
|
|
|
'com.lmax.disruptor.SequenceReportingEventHandler',
|
|
|
|
'com.lmax.disruptor.SleepingWaitStrategy',
|
|
|
|
'com.lmax.disruptor.TimeoutBlockingWaitStrategy',
|
|
|
|
'com.lmax.disruptor.WaitStrategy',
|
|
|
|
'com.lmax.disruptor.YieldingWaitStrategy',
|
|
|
|
'com.lmax.disruptor.dsl.Disruptor',
|
|
|
|
'com.lmax.disruptor.dsl.ProducerType',
|
|
|
|
'javax.jms.Connection',
|
|
|
|
'javax.jms.ConnectionFactory',
|
|
|
|
'javax.jms.Destination',
|
|
|
|
'javax.jms.JMSException',
|
|
|
|
'javax.jms.MapMessage',
|
|
|
|
'javax.jms.Message',
|
|
|
|
'javax.jms.MessageConsumer',
|
|
|
|
'javax.jms.MessageProducer',
|
|
|
|
'javax.jms.Session',
|
|
|
|
'javax.mail.Authenticator',
|
|
|
|
'javax.mail.Message$RecipientType',
|
|
|
|
'javax.mail.PasswordAuthentication',
|
|
|
|
'javax.mail.Session',
|
|
|
|
'javax.mail.Transport',
|
|
|
|
'javax.mail.internet.InternetAddress',
|
|
|
|
'javax.mail.internet.InternetHeaders',
|
|
|
|
'javax.mail.internet.MimeBodyPart',
|
|
|
|
'javax.mail.internet.MimeMessage',
|
|
|
|
'javax.mail.internet.MimeMultipart',
|
|
|
|
'javax.mail.internet.MimeUtility',
|
|
|
|
'javax.mail.util.ByteArrayDataSource',
|
|
|
|
'org.apache.commons.compress.compressors.CompressorStreamFactory',
|
|
|
|
'org.apache.commons.compress.utils.IOUtils',
|
|
|
|
'org.apache.commons.csv.CSVFormat',
|
|
|
|
'org.apache.commons.csv.QuoteMode',
|
|
|
|
'org.apache.kafka.clients.producer.Callback',
|
|
|
|
'org.apache.kafka.clients.producer.KafkaProducer',
|
|
|
|
'org.apache.kafka.clients.producer.Producer',
|
|
|
|
'org.apache.kafka.clients.producer.ProducerRecord',
|
|
|
|
'org.apache.kafka.clients.producer.RecordMetadata',
|
|
|
|
'org.codehaus.stax2.XMLStreamWriter2',
|
|
|
|
'org.jctools.queues.MessagePassingQueue$Consumer',
|
|
|
|
'org.jctools.queues.MpscArrayQueue',
|
|
|
|
'org.osgi.framework.AdaptPermission',
|
|
|
|
'org.osgi.framework.AdminPermission',
|
|
|
|
'org.osgi.framework.Bundle',
|
|
|
|
'org.osgi.framework.BundleActivator',
|
|
|
|
'org.osgi.framework.BundleContext',
|
|
|
|
'org.osgi.framework.BundleEvent',
|
|
|
|
'org.osgi.framework.BundleReference',
|
|
|
|
'org.osgi.framework.FrameworkUtil',
|
|
|
|
'org.osgi.framework.ServiceRegistration',
|
|
|
|
'org.osgi.framework.SynchronousBundleListener',
|
|
|
|
'org.osgi.framework.wiring.BundleWire',
|
|
|
|
'org.osgi.framework.wiring.BundleWiring',
|
|
|
|
'org.zeromq.ZMQ$Context',
|
|
|
|
'org.zeromq.ZMQ$Socket',
|
|
|
|
'org.zeromq.ZMQ',
|
|
|
|
)
|
|
|
|
ignoreMissingClasses 'javax.xml.bind.DatatypeConverter'
|
|
|
|
}
|
2017-07-27 22:14:04 +08:00
|
|
|
|
2020-06-18 00:27:16 +08:00
|
|
|
tasks.named("dependencyLicenses").configure {
|
2020-07-31 17:29:14 +08:00
|
|
|
mapping from: /lucene-.*/, to: 'lucene'
|
|
|
|
dependencies = project.configurations.runtimeClasspath.fileCollection {
|
|
|
|
it.group.startsWith('org.elasticsearch') == false ||
|
|
|
|
// keep the following org.elasticsearch jars in
|
|
|
|
(it.name == 'jna' ||
|
|
|
|
it.name == 'securesm')
|
|
|
|
}
|
2016-11-08 07:29:35 +08:00
|
|
|
}
|
2015-12-02 09:08:27 +08:00
|
|
|
|
2020-07-31 17:29:14 +08:00
|
|
|
tasks.named("licenseHeaders").configure {
|
|
|
|
// Ignore our vendored version of Google Guice
|
|
|
|
excludes << 'org/elasticsearch/common/inject/**/*'
|
2020-08-25 22:27:49 +08:00
|
|
|
// Ignore temporary copies of impending 8.7 Lucene classes
|
|
|
|
excludes << 'org/apache/lucene/search/RegExp87*'
|
|
|
|
excludes << 'org/apache/lucene/search/RegexpQuery87*'
|
2020-06-02 06:23:41 +08:00
|
|
|
}
|
2021-06-09 06:04:23 +08:00
|
|
|
|
|
|
|
tasks.named('splitPackagesAudit').configure {
|
|
|
|
// Lucene packages should be owned by Lucene!
|
2021-09-27 20:38:51 +08:00
|
|
|
ignoreClasses 'org.apache.lucene.queries.BinaryDocValuesRangeQuery',
|
2021-06-09 06:04:23 +08:00
|
|
|
'org.apache.lucene.queries.BlendedTermQuery',
|
|
|
|
'org.apache.lucene.queries.SpanMatchNoDocsQuery',
|
|
|
|
'org.apache.lucene.search.grouping.CollapseTopFieldDocs',
|
|
|
|
'org.apache.lucene.search.grouping.CollapsingDocValuesSource',
|
|
|
|
'org.apache.lucene.search.grouping.CollapsingTopDocsCollector',
|
|
|
|
'org.apache.lucene.search.vectorhighlight.CustomFieldQuery',
|
|
|
|
|
|
|
|
// These are tricky because Lucene itself splits the index package,
|
|
|
|
// but this should be fixed in Lucene 9
|
|
|
|
'org.apache.lucene.index.LazySoftDeletesDirectoryReaderWrapper',
|
|
|
|
|
|
|
|
// cli is owned by the libs/cli, so these should be moved to o.e.server.cli
|
|
|
|
'org.elasticsearch.cli.CommandLoggingConfigurator',
|
|
|
|
'org.elasticsearch.cli.EnvironmentAwareCommand',
|
|
|
|
'org.elasticsearch.cli.KeyStoreAwareCommand',
|
|
|
|
'org.elasticsearch.cli.LoggingAwareCommand',
|
2021-09-20 10:58:03 +08:00
|
|
|
'org.elasticsearch.cli.LoggingAwareMultiCommand'
|
2021-06-09 06:04:23 +08:00
|
|
|
|
|
|
|
}
|