From cfdaf530bd16964cb83a4333236aea267c819deb Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 3 Dec 2015 14:18:26 -0800 Subject: [PATCH 01/23] Added modules, distributions now include them (just plugins installed in a diff dir) --- distribution/integ-test-zip/build.gradle | 31 +++++++++++++++++++ modules/build.gradle | 27 ++++++++++++++++ .../licenses/antlr4-runtime-4.5.1-1.jar.sha1 | 0 .../licenses/antlr4-runtime-LICENSE.txt | 0 .../licenses/antlr4-runtime-NOTICE.txt | 0 .../licenses/asm-5.0.4.jar.sha1 | 0 .../lang-expression/licenses/asm-LICENSE.txt | 0 .../lang-expression/licenses/asm-NOTICE.txt | 0 .../licenses/asm-commons-5.0.4.jar.sha1 | 0 .../licenses/asm-commons-LICENSE.txt | 0 .../licenses/asm-commons-NOTICE.txt | 0 .../licenses/lucene-LICENSE.txt | 0 .../licenses/lucene-NOTICE.txt | 0 ...xpressions-5.4.0-snapshot-1715952.jar.sha1 | 0 {plugins => modules}/lang-expression/pom.xml | 0 .../expression/CountMethodFunctionValues.java | 0 .../expression/CountMethodValueSource.java | 0 .../expression/DateMethodFunctionValues.java | 0 .../expression/DateMethodValueSource.java | 0 .../ExpressionExecutableScript.java | 0 .../script/expression/ExpressionPlugin.java | 0 .../ExpressionScriptEngineService.java | 0 .../expression/ExpressionSearchScript.java | 0 .../expression/FieldDataFunctionValues.java | 0 .../expression/FieldDataValueSource.java | 0 .../ReplaceableConstFunctionValues.java | 0 .../ReplaceableConstValueSource.java | 0 .../plugin-metadata/plugin-security.policy | 0 .../script/expression/ExpressionRestIT.java | 0 .../script/expression/ExpressionTests.java | 0 .../expression/IndexedExpressionTests.java | 0 .../expression/MoreExpressionTests.java | 0 .../test/lang_expression/10_basic.yaml | 0 .../test/lang_expression/20_search.yaml | 0 .../licenses/groovy-all-2.4.4-indy.jar.sha1 | 0 .../licenses/groovy-all-LICENSE-ANTLR.txt | 0 .../licenses/groovy-all-LICENSE-ASM.txt | 0 .../licenses/groovy-all-LICENSE-CLI.txt | 0 .../licenses/groovy-all-LICENSE-JSR223.txt | 0 .../licenses/groovy-all-LICENSE.txt | 0 .../licenses/groovy-all-NOTICE.txt | 0 {plugins => modules}/lang-groovy/pom.xml | 0 .../script/groovy/GroovyPlugin.java | 0 .../groovy/GroovyScriptEngineService.java | 0 .../plugin-metadata/plugin-security.policy | 0 .../messy/tests/BucketScriptTests.java | 0 .../messy/tests/BucketSelectorTests.java | 0 .../elasticsearch/messy/tests/BulkTests.java | 0 .../messy/tests/CardinalityTests.java | 0 .../tests/ContextAndHeaderTransportTests.java | 0 .../messy/tests/DateRangeTests.java | 0 .../messy/tests/DoubleTermsTests.java | 0 .../messy/tests/EquivalenceTests.java | 0 .../messy/tests/ExtendedStatsTests.java | 0 .../messy/tests/FunctionScoreTests.java | 0 .../messy/tests/GeoDistanceTests.java | 0 .../messy/tests/GeoShapeIntegrationTests.java | 0 .../messy/tests/HDRPercentileRanksTests.java | 0 .../messy/tests/HDRPercentilesTests.java | 0 .../messy/tests/HistogramTests.java | 0 .../messy/tests/IPv4RangeTests.java | 0 .../messy/tests/IndexLookupTests.java | 0 .../messy/tests/IndexedScriptTests.java | 0 .../messy/tests/IndicesRequestTests.java | 0 .../messy/tests/LongTermsTests.java | 0 .../elasticsearch/messy/tests/MaxTests.java | 0 .../messy/tests/MinDocCountTests.java | 0 .../elasticsearch/messy/tests/MinTests.java | 0 .../messy/tests/RandomScoreFunctionTests.java | 0 .../elasticsearch/messy/tests/RangeTests.java | 0 .../messy/tests/ScriptIndexSettingsTests.java | 0 .../messy/tests/ScriptQuerySearchTests.java | 0 .../messy/tests/ScriptedMetricTests.java | 0 .../messy/tests/SearchFieldsTests.java | 0 .../messy/tests/SearchStatsTests.java | 0 .../messy/tests/SimpleSortTests.java | 0 .../elasticsearch/messy/tests/StatsTests.java | 0 .../messy/tests/StringTermsTests.java | 0 .../tests/TDigestPercentileRanksTests.java | 0 .../messy/tests/TDigestPercentilesTests.java | 0 .../tests/TransformOnIndexMapperTests.java | 0 .../messy/tests/package-info.java | 0 .../script/groovy/GroovyRestIT.java | 0 .../script/groovy/GroovyScriptTests.java | 0 .../script/groovy/GroovySecurityTests.java | 0 .../tests/conf/scripts/combine_script.groovy | 0 .../tests/conf/scripts/init_script.groovy | 0 .../tests/conf/scripts/map_script.groovy | 0 .../tests/conf/scripts/reduce_script.groovy | 0 .../significance_script_no_params.groovy | 0 .../significance_script_with_params.groovy | 0 .../test/lang_groovy/10_basic.yaml | 0 .../test/lang_groovy/15_update.yaml | 0 .../test/lang_groovy/16_update2.yaml | 0 .../test/lang_groovy/20_versions.yaml | 0 .../test/lang_groovy/25_script_upsert.yaml | 0 .../test/lang_groovy/90_missing.yaml | 0 97 files changed, 58 insertions(+) create mode 100644 distribution/integ-test-zip/build.gradle create mode 100644 modules/build.gradle rename {plugins => modules}/lang-expression/licenses/antlr4-runtime-4.5.1-1.jar.sha1 (100%) rename {plugins => modules}/lang-expression/licenses/antlr4-runtime-LICENSE.txt (100%) rename {plugins => modules}/lang-expression/licenses/antlr4-runtime-NOTICE.txt (100%) rename {plugins => modules}/lang-expression/licenses/asm-5.0.4.jar.sha1 (100%) rename {plugins => modules}/lang-expression/licenses/asm-LICENSE.txt (100%) rename {plugins => modules}/lang-expression/licenses/asm-NOTICE.txt (100%) rename {plugins => modules}/lang-expression/licenses/asm-commons-5.0.4.jar.sha1 (100%) rename {plugins => modules}/lang-expression/licenses/asm-commons-LICENSE.txt (100%) rename {plugins => modules}/lang-expression/licenses/asm-commons-NOTICE.txt (100%) rename {plugins => modules}/lang-expression/licenses/lucene-LICENSE.txt (100%) rename {plugins => modules}/lang-expression/licenses/lucene-NOTICE.txt (100%) rename {plugins => modules}/lang-expression/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 (100%) rename {plugins => modules}/lang-expression/pom.xml (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodFunctionValues.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodValueSource.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodFunctionValues.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodValueSource.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionExecutableScript.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionScriptEngineService.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionSearchScript.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataFunctionValues.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataValueSource.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstFunctionValues.java (100%) rename {plugins => modules}/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstValueSource.java (100%) rename {plugins => modules}/lang-expression/src/main/plugin-metadata/plugin-security.policy (100%) rename {plugins => modules}/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionRestIT.java (100%) rename {plugins => modules}/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTests.java (100%) rename {plugins => modules}/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java (100%) rename {plugins => modules}/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java (100%) rename {plugins => modules}/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml (100%) rename {plugins => modules}/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yaml (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-2.4.4-indy.jar.sha1 (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-LICENSE-ANTLR.txt (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-LICENSE-ASM.txt (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-LICENSE-CLI.txt (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-LICENSE-JSR223.txt (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-LICENSE.txt (100%) rename {plugins => modules}/lang-groovy/licenses/groovy-all-NOTICE.txt (100%) rename {plugins => modules}/lang-groovy/pom.xml (100%) rename {plugins => modules}/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java (100%) rename {plugins => modules}/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java (100%) rename {plugins => modules}/lang-groovy/src/main/plugin-metadata/plugin-security.policy (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketScriptTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketSelectorTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BulkTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/CardinalityTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DateRangeTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DoubleTermsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/EquivalenceTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ExtendedStatsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/FunctionScoreTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoDistanceTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoShapeIntegrationTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentileRanksTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentilesTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HistogramTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IPv4RangeTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexLookupTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/LongTermsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MaxTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinDocCountTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RandomScoreFunctionTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RangeTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptIndexSettingsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptQuerySearchTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptedMetricTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchFieldsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchStatsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SimpleSortTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StatsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StringTermsTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentileRanksTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentilesTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TransformOnIndexMapperTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/messy/tests/package-info.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyRestIT.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyScriptTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovySecurityTests.java (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/combine_script.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/init_script.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/map_script.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/reduce_script.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_no_params.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_with_params.groovy (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/15_update.yaml (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/16_update2.yaml (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/20_versions.yaml (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/25_script_upsert.yaml (100%) rename {plugins => modules}/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/90_missing.yaml (100%) diff --git a/distribution/integ-test-zip/build.gradle b/distribution/integ-test-zip/build.gradle new file mode 100644 index 0000000000000..d636e66f1529b --- /dev/null +++ b/distribution/integ-test-zip/build.gradle @@ -0,0 +1,31 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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. + */ + +task buildZip(type: Zip, dependsOn: dependencyFiles) { + baseName = 'elasticsearch' + with archivesFiles +} + +artifacts { + 'default' buildZip + archives buildZip +} + +integTest.dependsOn buildZip + diff --git a/modules/build.gradle b/modules/build.gradle new file mode 100644 index 0000000000000..a5da792854942 --- /dev/null +++ b/modules/build.gradle @@ -0,0 +1,27 @@ +/* + * Licensed to Elasticsearch under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch 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. + */ + +subprojects { + apply plugin: 'elasticsearch.esplugin' + + esplugin { + // for local ES plugins, the name of the plugin is the same as the directory + name project.name + } +} diff --git a/plugins/lang-expression/licenses/antlr4-runtime-4.5.1-1.jar.sha1 b/modules/lang-expression/licenses/antlr4-runtime-4.5.1-1.jar.sha1 similarity index 100% rename from plugins/lang-expression/licenses/antlr4-runtime-4.5.1-1.jar.sha1 rename to modules/lang-expression/licenses/antlr4-runtime-4.5.1-1.jar.sha1 diff --git a/plugins/lang-expression/licenses/antlr4-runtime-LICENSE.txt b/modules/lang-expression/licenses/antlr4-runtime-LICENSE.txt similarity index 100% rename from plugins/lang-expression/licenses/antlr4-runtime-LICENSE.txt rename to modules/lang-expression/licenses/antlr4-runtime-LICENSE.txt diff --git a/plugins/lang-expression/licenses/antlr4-runtime-NOTICE.txt b/modules/lang-expression/licenses/antlr4-runtime-NOTICE.txt similarity index 100% rename from plugins/lang-expression/licenses/antlr4-runtime-NOTICE.txt rename to modules/lang-expression/licenses/antlr4-runtime-NOTICE.txt diff --git a/plugins/lang-expression/licenses/asm-5.0.4.jar.sha1 b/modules/lang-expression/licenses/asm-5.0.4.jar.sha1 similarity index 100% rename from plugins/lang-expression/licenses/asm-5.0.4.jar.sha1 rename to modules/lang-expression/licenses/asm-5.0.4.jar.sha1 diff --git a/plugins/lang-expression/licenses/asm-LICENSE.txt b/modules/lang-expression/licenses/asm-LICENSE.txt similarity index 100% rename from plugins/lang-expression/licenses/asm-LICENSE.txt rename to modules/lang-expression/licenses/asm-LICENSE.txt diff --git a/plugins/lang-expression/licenses/asm-NOTICE.txt b/modules/lang-expression/licenses/asm-NOTICE.txt similarity index 100% rename from plugins/lang-expression/licenses/asm-NOTICE.txt rename to modules/lang-expression/licenses/asm-NOTICE.txt diff --git a/plugins/lang-expression/licenses/asm-commons-5.0.4.jar.sha1 b/modules/lang-expression/licenses/asm-commons-5.0.4.jar.sha1 similarity index 100% rename from plugins/lang-expression/licenses/asm-commons-5.0.4.jar.sha1 rename to modules/lang-expression/licenses/asm-commons-5.0.4.jar.sha1 diff --git a/plugins/lang-expression/licenses/asm-commons-LICENSE.txt b/modules/lang-expression/licenses/asm-commons-LICENSE.txt similarity index 100% rename from plugins/lang-expression/licenses/asm-commons-LICENSE.txt rename to modules/lang-expression/licenses/asm-commons-LICENSE.txt diff --git a/plugins/lang-expression/licenses/asm-commons-NOTICE.txt b/modules/lang-expression/licenses/asm-commons-NOTICE.txt similarity index 100% rename from plugins/lang-expression/licenses/asm-commons-NOTICE.txt rename to modules/lang-expression/licenses/asm-commons-NOTICE.txt diff --git a/plugins/lang-expression/licenses/lucene-LICENSE.txt b/modules/lang-expression/licenses/lucene-LICENSE.txt similarity index 100% rename from plugins/lang-expression/licenses/lucene-LICENSE.txt rename to modules/lang-expression/licenses/lucene-LICENSE.txt diff --git a/plugins/lang-expression/licenses/lucene-NOTICE.txt b/modules/lang-expression/licenses/lucene-NOTICE.txt similarity index 100% rename from plugins/lang-expression/licenses/lucene-NOTICE.txt rename to modules/lang-expression/licenses/lucene-NOTICE.txt diff --git a/plugins/lang-expression/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 b/modules/lang-expression/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 similarity index 100% rename from plugins/lang-expression/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 rename to modules/lang-expression/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 diff --git a/plugins/lang-expression/pom.xml b/modules/lang-expression/pom.xml similarity index 100% rename from plugins/lang-expression/pom.xml rename to modules/lang-expression/pom.xml diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodFunctionValues.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodFunctionValues.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodFunctionValues.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodFunctionValues.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodValueSource.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodValueSource.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodValueSource.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/CountMethodValueSource.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodFunctionValues.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodFunctionValues.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodFunctionValues.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodFunctionValues.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodValueSource.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodValueSource.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodValueSource.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/DateMethodValueSource.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionExecutableScript.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionExecutableScript.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionExecutableScript.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionExecutableScript.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionPlugin.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionScriptEngineService.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionScriptEngineService.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionScriptEngineService.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionScriptEngineService.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionSearchScript.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionSearchScript.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionSearchScript.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ExpressionSearchScript.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataFunctionValues.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataFunctionValues.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataFunctionValues.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataFunctionValues.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataValueSource.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataValueSource.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataValueSource.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/FieldDataValueSource.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstFunctionValues.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstFunctionValues.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstFunctionValues.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstFunctionValues.java diff --git a/plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstValueSource.java b/modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstValueSource.java similarity index 100% rename from plugins/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstValueSource.java rename to modules/lang-expression/src/main/java/org/elasticsearch/script/expression/ReplaceableConstValueSource.java diff --git a/plugins/lang-expression/src/main/plugin-metadata/plugin-security.policy b/modules/lang-expression/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from plugins/lang-expression/src/main/plugin-metadata/plugin-security.policy rename to modules/lang-expression/src/main/plugin-metadata/plugin-security.policy diff --git a/plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionRestIT.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionRestIT.java similarity index 100% rename from plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionRestIT.java rename to modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionRestIT.java diff --git a/plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTests.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTests.java similarity index 100% rename from plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTests.java rename to modules/lang-expression/src/test/java/org/elasticsearch/script/expression/ExpressionTests.java diff --git a/plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java similarity index 100% rename from plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java rename to modules/lang-expression/src/test/java/org/elasticsearch/script/expression/IndexedExpressionTests.java diff --git a/plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java b/modules/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java similarity index 100% rename from plugins/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java rename to modules/lang-expression/src/test/java/org/elasticsearch/script/expression/MoreExpressionTests.java diff --git a/plugins/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml similarity index 100% rename from plugins/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml rename to modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml diff --git a/plugins/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yaml b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yaml similarity index 100% rename from plugins/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yaml rename to modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/20_search.yaml diff --git a/plugins/lang-groovy/licenses/groovy-all-2.4.4-indy.jar.sha1 b/modules/lang-groovy/licenses/groovy-all-2.4.4-indy.jar.sha1 similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-2.4.4-indy.jar.sha1 rename to modules/lang-groovy/licenses/groovy-all-2.4.4-indy.jar.sha1 diff --git a/plugins/lang-groovy/licenses/groovy-all-LICENSE-ANTLR.txt b/modules/lang-groovy/licenses/groovy-all-LICENSE-ANTLR.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-LICENSE-ANTLR.txt rename to modules/lang-groovy/licenses/groovy-all-LICENSE-ANTLR.txt diff --git a/plugins/lang-groovy/licenses/groovy-all-LICENSE-ASM.txt b/modules/lang-groovy/licenses/groovy-all-LICENSE-ASM.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-LICENSE-ASM.txt rename to modules/lang-groovy/licenses/groovy-all-LICENSE-ASM.txt diff --git a/plugins/lang-groovy/licenses/groovy-all-LICENSE-CLI.txt b/modules/lang-groovy/licenses/groovy-all-LICENSE-CLI.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-LICENSE-CLI.txt rename to modules/lang-groovy/licenses/groovy-all-LICENSE-CLI.txt diff --git a/plugins/lang-groovy/licenses/groovy-all-LICENSE-JSR223.txt b/modules/lang-groovy/licenses/groovy-all-LICENSE-JSR223.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-LICENSE-JSR223.txt rename to modules/lang-groovy/licenses/groovy-all-LICENSE-JSR223.txt diff --git a/plugins/lang-groovy/licenses/groovy-all-LICENSE.txt b/modules/lang-groovy/licenses/groovy-all-LICENSE.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-LICENSE.txt rename to modules/lang-groovy/licenses/groovy-all-LICENSE.txt diff --git a/plugins/lang-groovy/licenses/groovy-all-NOTICE.txt b/modules/lang-groovy/licenses/groovy-all-NOTICE.txt similarity index 100% rename from plugins/lang-groovy/licenses/groovy-all-NOTICE.txt rename to modules/lang-groovy/licenses/groovy-all-NOTICE.txt diff --git a/plugins/lang-groovy/pom.xml b/modules/lang-groovy/pom.xml similarity index 100% rename from plugins/lang-groovy/pom.xml rename to modules/lang-groovy/pom.xml diff --git a/plugins/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java b/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java similarity index 100% rename from plugins/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java rename to modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyPlugin.java diff --git a/plugins/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java b/modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java similarity index 100% rename from plugins/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java rename to modules/lang-groovy/src/main/java/org/elasticsearch/script/groovy/GroovyScriptEngineService.java diff --git a/plugins/lang-groovy/src/main/plugin-metadata/plugin-security.policy b/modules/lang-groovy/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from plugins/lang-groovy/src/main/plugin-metadata/plugin-security.policy rename to modules/lang-groovy/src/main/plugin-metadata/plugin-security.policy diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketScriptTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketScriptTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketScriptTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketScriptTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketSelectorTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketSelectorTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketSelectorTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BucketSelectorTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BulkTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BulkTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BulkTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/BulkTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/CardinalityTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/CardinalityTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/CardinalityTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/CardinalityTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ContextAndHeaderTransportTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DateRangeTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DateRangeTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DateRangeTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DateRangeTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DoubleTermsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DoubleTermsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DoubleTermsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/DoubleTermsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/EquivalenceTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/EquivalenceTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/EquivalenceTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/EquivalenceTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ExtendedStatsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ExtendedStatsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ExtendedStatsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ExtendedStatsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/FunctionScoreTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/FunctionScoreTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/FunctionScoreTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/FunctionScoreTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoDistanceTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoDistanceTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoDistanceTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoDistanceTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoShapeIntegrationTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoShapeIntegrationTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoShapeIntegrationTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/GeoShapeIntegrationTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentileRanksTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentileRanksTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentileRanksTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentileRanksTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentilesTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentilesTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentilesTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HDRPercentilesTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HistogramTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HistogramTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HistogramTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/HistogramTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IPv4RangeTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IPv4RangeTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IPv4RangeTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IPv4RangeTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexLookupTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexLookupTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexLookupTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexLookupTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndexedScriptTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/IndicesRequestTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/LongTermsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/LongTermsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/LongTermsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/LongTermsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MaxTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MaxTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MaxTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MaxTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinDocCountTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinDocCountTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinDocCountTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinDocCountTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/MinTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RandomScoreFunctionTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RandomScoreFunctionTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RandomScoreFunctionTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RandomScoreFunctionTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RangeTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RangeTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RangeTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/RangeTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptIndexSettingsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptIndexSettingsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptIndexSettingsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptIndexSettingsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptQuerySearchTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptQuerySearchTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptQuerySearchTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptQuerySearchTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptedMetricTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptedMetricTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptedMetricTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/ScriptedMetricTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchFieldsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchFieldsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchFieldsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchFieldsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchStatsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchStatsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchStatsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SearchStatsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SimpleSortTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SimpleSortTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SimpleSortTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/SimpleSortTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StatsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StatsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StatsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StatsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StringTermsTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StringTermsTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StringTermsTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/StringTermsTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentileRanksTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentileRanksTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentileRanksTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentileRanksTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentilesTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentilesTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentilesTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TDigestPercentilesTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TransformOnIndexMapperTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TransformOnIndexMapperTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TransformOnIndexMapperTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/TransformOnIndexMapperTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/package-info.java b/modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/package-info.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/messy/tests/package-info.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/messy/tests/package-info.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyRestIT.java b/modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyRestIT.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyRestIT.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyRestIT.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyScriptTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyScriptTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyScriptTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovyScriptTests.java diff --git a/plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovySecurityTests.java b/modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovySecurityTests.java similarity index 100% rename from plugins/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovySecurityTests.java rename to modules/lang-groovy/src/test/java/org/elasticsearch/script/groovy/GroovySecurityTests.java diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/combine_script.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/combine_script.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/combine_script.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/combine_script.groovy diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/init_script.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/init_script.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/init_script.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/init_script.groovy diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/map_script.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/map_script.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/map_script.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/map_script.groovy diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/reduce_script.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/reduce_script.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/reduce_script.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/reduce_script.groovy diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_no_params.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_no_params.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_no_params.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_no_params.groovy diff --git a/plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_with_params.groovy b/modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_with_params.groovy similarity index 100% rename from plugins/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_with_params.groovy rename to modules/lang-groovy/src/test/resources/org/elasticsearch/messy/tests/conf/scripts/significance_script_with_params.groovy diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/15_update.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/15_update.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/15_update.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/15_update.yaml diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/16_update2.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/16_update2.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/16_update2.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/16_update2.yaml diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/20_versions.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/20_versions.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/20_versions.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/20_versions.yaml diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/25_script_upsert.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/25_script_upsert.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/25_script_upsert.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/25_script_upsert.yaml diff --git a/plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/90_missing.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/90_missing.yaml similarity index 100% rename from plugins/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/90_missing.yaml rename to modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/90_missing.yaml From 66bce96a2d11fb82042a2d7f0fdce45e00965f0f Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Thu, 3 Dec 2015 14:52:51 -0800 Subject: [PATCH 02/23] Add integ-test-zip distribution --- .../org/elasticsearch/test/rest/RestIT.java} | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename distribution/integ-test-zip/{build.gradle => src/test/java/org/elasticsearch/test/rest/RestIT.java} (55%) diff --git a/distribution/integ-test-zip/build.gradle b/distribution/integ-test-zip/src/test/java/org/elasticsearch/test/rest/RestIT.java similarity index 55% rename from distribution/integ-test-zip/build.gradle rename to distribution/integ-test-zip/src/test/java/org/elasticsearch/test/rest/RestIT.java index d636e66f1529b..fd12fd2e51905 100644 --- a/distribution/integ-test-zip/build.gradle +++ b/distribution/integ-test-zip/src/test/java/org/elasticsearch/test/rest/RestIT.java @@ -17,15 +17,22 @@ * under the License. */ -task buildZip(type: Zip, dependsOn: dependencyFiles) { - baseName = 'elasticsearch' - with archivesFiles -} +package org.elasticsearch.test.rest; -artifacts { - 'default' buildZip - archives buildZip -} +import com.carrotsearch.randomizedtesting.annotations.ParametersFactory; -integTest.dependsOn buildZip +import org.elasticsearch.test.rest.parser.RestTestParseException; +import java.io.IOException; + +/** Rest integration test. runs against external cluster in 'mvn verify' */ +public class RestIT extends ESRestTestCase { + public RestIT(RestTestCandidate testCandidate) { + super(testCandidate); + } + // we run them all sequentially: start simple! + @ParametersFactory + public static Iterable parameters() throws IOException, RestTestParseException { + return createParameters(0, 1); + } +} From e3cf85050d98ae112b8dda8d0f1f287a732b9c54 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 3 Dec 2015 22:34:24 -0500 Subject: [PATCH 03/23] add modules/ infra (but no loading via pluginservice yet) --- .../org/elasticsearch/bootstrap/Security.java | 57 ++++++++++++------- .../org/elasticsearch/env/Environment.java | 7 +++ 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/bootstrap/Security.java b/core/src/main/java/org/elasticsearch/bootstrap/Security.java index 55e7eae90ad45..4229372da5985 100644 --- a/core/src/main/java/org/elasticsearch/bootstrap/Security.java +++ b/core/src/main/java/org/elasticsearch/bootstrap/Security.java @@ -131,34 +131,48 @@ static void configure(Environment environment, boolean filterBadDefaults) throws @SuppressForbidden(reason = "proper use of URL") static Map getPluginPermissions(Environment environment) throws IOException, NoSuchAlgorithmException { Map map = new HashMap<>(); + // collect up lists of plugins and modules + List pluginsAndModules = new ArrayList<>(); if (Files.exists(environment.pluginsFile())) { try (DirectoryStream stream = Files.newDirectoryStream(environment.pluginsFile())) { for (Path plugin : stream) { - Path policyFile = plugin.resolve(PluginInfo.ES_PLUGIN_POLICY); - if (Files.exists(policyFile)) { - // first get a list of URLs for the plugins' jars: - // we resolve symlinks so map is keyed on the normalize codebase name - List codebases = new ArrayList<>(); - try (DirectoryStream jarStream = Files.newDirectoryStream(plugin, "*.jar")) { - for (Path jar : jarStream) { - codebases.add(jar.toRealPath().toUri().toURL()); - } - } - - // parse the plugin's policy file into a set of permissions - Policy policy = readPolicy(policyFile.toUri().toURL(), codebases.toArray(new URL[codebases.size()])); - - // consult this policy for each of the plugin's jars: - for (URL url : codebases) { - if (map.put(url.getFile(), policy) != null) { - // just be paranoid ok? - throw new IllegalStateException("per-plugin permissions already granted for jar file: " + url); - } - } + pluginsAndModules.add(plugin); + } + } + } + if (Files.exists(environment.modulesFile())) { + try (DirectoryStream stream = Files.newDirectoryStream(environment.modulesFile())) { + for (Path plugin : stream) { + pluginsAndModules.add(plugin); + } + } + } + // now process each one + for (Path plugin : pluginsAndModules) { + Path policyFile = plugin.resolve(PluginInfo.ES_PLUGIN_POLICY); + if (Files.exists(policyFile)) { + // first get a list of URLs for the plugins' jars: + // we resolve symlinks so map is keyed on the normalize codebase name + List codebases = new ArrayList<>(); + try (DirectoryStream jarStream = Files.newDirectoryStream(plugin, "*.jar")) { + for (Path jar : jarStream) { + codebases.add(jar.toRealPath().toUri().toURL()); + } + } + + // parse the plugin's policy file into a set of permissions + Policy policy = readPolicy(policyFile.toUri().toURL(), codebases.toArray(new URL[codebases.size()])); + + // consult this policy for each of the plugin's jars: + for (URL url : codebases) { + if (map.put(url.getFile(), policy) != null) { + // just be paranoid ok? + throw new IllegalStateException("per-plugin permissions already granted for jar file: " + url); } } } } + return Collections.unmodifiableMap(map); } @@ -228,6 +242,7 @@ static void addFilePermissions(Permissions policy, Environment environment) { // read-only dirs addPath(policy, "path.home", environment.binFile(), "read,readlink"); addPath(policy, "path.home", environment.libFile(), "read,readlink"); + addPath(policy, "path.home", environment.modulesFile(), "read,readlink"); addPath(policy, "path.plugins", environment.pluginsFile(), "read,readlink"); addPath(policy, "path.conf", environment.configFile(), "read,readlink"); addPath(policy, "path.scripts", environment.scriptsFile(), "read,readlink"); diff --git a/core/src/main/java/org/elasticsearch/env/Environment.java b/core/src/main/java/org/elasticsearch/env/Environment.java index c5c769a73c24f..7982c2f35ea4c 100644 --- a/core/src/main/java/org/elasticsearch/env/Environment.java +++ b/core/src/main/java/org/elasticsearch/env/Environment.java @@ -58,6 +58,8 @@ public class Environment { private final Path pluginsFile; + private final Path modulesFile; + private final Path sharedDataFile; /** location of bin/, used by plugin manager */ @@ -157,6 +159,7 @@ public Environment(Settings settings) { binFile = homeFile.resolve("bin"); libFile = homeFile.resolve("lib"); + modulesFile = homeFile.resolve("modules"); } /** @@ -275,6 +278,10 @@ public Path libFile() { return libFile; } + public Path modulesFile() { + return modulesFile; + } + public Path logsFile() { return logsFile; } From 9d8e900bf49d3fa98604cddeb48d0ff0a904be4b Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 3 Dec 2015 22:37:27 -0500 Subject: [PATCH 04/23] add test for modules/ --- .../test/java/org/elasticsearch/bootstrap/SecurityTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java index d0685b1a6cebf..9c3e616596424 100644 --- a/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java +++ b/core/src/test/java/org/elasticsearch/bootstrap/SecurityTests.java @@ -109,6 +109,8 @@ public void testEnvironmentPaths() throws Exception { assertExactPermissions(new FilePermission(environment.binFile().toString(), "read,readlink"), permissions); // lib file: ro assertExactPermissions(new FilePermission(environment.libFile().toString(), "read,readlink"), permissions); + // modules file: ro + assertExactPermissions(new FilePermission(environment.modulesFile().toString(), "read,readlink"), permissions); // config file: ro assertExactPermissions(new FilePermission(environment.configFile().toString(), "read,readlink"), permissions); // scripts file: ro From 4977dd0a037e4034cfc54842900d19b878cc203d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 3 Dec 2015 23:01:03 -0500 Subject: [PATCH 05/23] add module loading logic (untested) --- .../client/transport/TransportClient.java | 2 +- .../java/org/elasticsearch/node/Node.java | 2 +- .../elasticsearch/plugins/PluginsService.java | 43 ++++++++++++++++++- .../plugins/PluginsServiceTests.java | 2 +- 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java b/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java index 54d4fcaba3388..5e8b8b1f141c9 100644 --- a/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java +++ b/core/src/main/java/org/elasticsearch/client/transport/TransportClient.java @@ -122,7 +122,7 @@ public TransportClient build() { .put(CLIENT_TYPE_SETTING, CLIENT_TYPE) .build(); - PluginsService pluginsService = new PluginsService(settings, null, pluginClasses); + PluginsService pluginsService = new PluginsService(settings, null, null, pluginClasses); this.settings = pluginsService.updatedSettings(); Version version = Version.CURRENT; diff --git a/core/src/main/java/org/elasticsearch/node/Node.java b/core/src/main/java/org/elasticsearch/node/Node.java index fcca8f76ce6c9..31a411ab67810 100644 --- a/core/src/main/java/org/elasticsearch/node/Node.java +++ b/core/src/main/java/org/elasticsearch/node/Node.java @@ -144,7 +144,7 @@ public Node(Settings preparedSettings) { tmpEnv.configFile(), Arrays.toString(tmpEnv.dataFiles()), tmpEnv.logsFile(), tmpEnv.pluginsFile()); } - this.pluginsService = new PluginsService(tmpSettings, tmpEnv.pluginsFile(), classpathPlugins); + this.pluginsService = new PluginsService(tmpSettings, tmpEnv.modulesFile(), tmpEnv.pluginsFile(), classpathPlugins); this.settings = pluginsService.updatedSettings(); // create the environment based on the finalized (processed) view of the settings this.environment = new Environment(this.settings()); diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index a0ef9c7575f34..7913e7417c062 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -86,10 +86,11 @@ static class OnModuleReference { /** * Constructs a new PluginService * @param settings The settings of the system + * @param modulesDirectory The directory modules exist in, or null if modules should not be loaded from the filesystem * @param pluginsDirectory The directory plugins exist in, or null if plugins should not be loaded from the filesystem * @param classpathPlugins Plugins that exist in the classpath which should be loaded */ - public PluginsService(Settings settings, Path pluginsDirectory, Collection> classpathPlugins) { + public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDirectory, Collection> classpathPlugins) { super(settings); List> tupleBuilder = new ArrayList<>(); @@ -104,6 +105,16 @@ public PluginsService(Settings settings, Path pluginsDirectory, Collection(pluginInfo, plugin)); } + // load modules + if (modulesDirectory != null) { + try { + List bundles = getModuleBundles(modulesDirectory); + tupleBuilder.addAll(loadBundles(bundles)); + } catch (IOException ex) { + throw new IllegalStateException("Unable to initialize modules", ex); + } + } + // now, find all the ones that are in plugins/ if (pluginsDirectory != null) { try { @@ -286,6 +297,36 @@ static class Bundle { List urls = new ArrayList<>(); } + // similar in impl to getPluginBundles, but DO NOT try to make them share code. + // we don't need to inherit all the leniency, and things are different enough. + static List getModuleBundles(Path modulesDirectory) throws IOException { + List bundles = new ArrayList<>(); + try (DirectoryStream stream = Files.newDirectoryStream(modulesDirectory)) { + for (Path module : stream) { + if (FileSystemUtils.isHidden(module)) { + continue; // skip over .DS_Store etc + } + PluginInfo info = PluginInfo.readFromProperties(module); + if (!info.isJvm()) { + throw new IllegalStateException("modules must be jvm plugins: " + info); + } + if (!info.isIsolated()) { + throw new IllegalStateException("modules must be isolated: " + info); + } + Bundle bundle = new Bundle(); + bundle.plugins.add(info); + // gather urls for jar files + try (DirectoryStream jarStream = Files.newDirectoryStream(module, "*.jar")) { + for (Path jar : jarStream) { + bundle.urls.add(jar.toUri().toURL()); + } + } + bundles.add(bundle); + } + } + return bundles; + } + static List getPluginBundles(Path pluginsDirectory) throws IOException { ESLogger logger = Loggers.getLogger(PluginsService.class); diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java index 19492728a5692..7142942d70c0d 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginsServiceTests.java @@ -83,7 +83,7 @@ protected void configure() { } static PluginsService newPluginsService(Settings settings, Class... classpathPlugins) { - return new PluginsService(settings, new Environment(settings).pluginsFile(), Arrays.asList(classpathPlugins)); + return new PluginsService(settings, null, new Environment(settings).pluginsFile(), Arrays.asList(classpathPlugins)); } public void testAdditionalSettings() { From ea700b3e35b2a8f3d459e0eb517527b1ff0fdf49 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 3 Dec 2015 23:25:36 -0500 Subject: [PATCH 06/23] add leniency for tests --- .../main/java/org/elasticsearch/plugins/PluginsService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 7913e7417c062..9f245f9ef434e 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -300,6 +300,10 @@ static class Bundle { // similar in impl to getPluginBundles, but DO NOT try to make them share code. // we don't need to inherit all the leniency, and things are different enough. static List getModuleBundles(Path modulesDirectory) throws IOException { + // damn leniency + if (Files.notExists(modulesDirectory)) { + return Collections.emptyList(); + } List bundles = new ArrayList<>(); try (DirectoryStream stream = Files.newDirectoryStream(modulesDirectory)) { for (Path module : stream) { From 58b8575f1a0a17df12b93094711f01951eb32a81 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Thu, 3 Dec 2015 23:36:02 -0500 Subject: [PATCH 07/23] don't let pluginmanager install modules --- .../java/org/elasticsearch/plugins/PluginManager.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java index d47c415afa284..09d37b8679578 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java @@ -66,6 +66,10 @@ public enum OutputMode { "plugin.bat", "service.bat").build(); + static final Set MODULES = unmodifiableSet(newHashSet( + "lang-expression", + "lang-groovy")); + static final ImmutableSet OFFICIAL_PLUGINS = ImmutableSet.builder() .add( "analysis-icu", @@ -219,6 +223,12 @@ private void extract(PluginHandle pluginHandle, Terminal terminal, Path pluginFi PluginInfo info = PluginInfo.readFromProperties(root); terminal.println(VERBOSE, "%s", info); + // don't let luser install plugin as a module... + // they might be unavoidably in maven central and are packaged up the same way) + if (MODULES.contains(info.getName())) { + throw new IOException("plugin '" + info.getName() + "' cannot be installed like this, it is a system module"); + } + // update name in handle based on 'name' property found in descriptor file pluginHandle = new PluginHandle(info.getName(), pluginHandle.version, pluginHandle.user); final Path extractLocation = pluginHandle.extractedDir(environment); From b6249c4140c302066af284dfb88af04c6a562e48 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 4 Dec 2015 01:12:50 -0500 Subject: [PATCH 08/23] list modules separately in pluginservice --- .../admin/cluster/node/info/NodeInfo.java | 3 +- .../admin/cluster/node/info/PluginsInfo.java | 80 +++++++++++-------- .../cluster/stats/ClusterStatsNodes.java | 2 +- .../elasticsearch/plugins/PluginsService.java | 28 ++++--- .../rest/action/cat/RestPluginsAction.java | 2 +- .../plugins/PluginInfoTests.java | 12 +-- .../hamcrest/ElasticsearchAssertions.java | 8 ++ .../test/lang_expression/10_basic.yaml | 4 +- .../test/lang_groovy/10_basic.yaml | 4 +- 9 files changed, 86 insertions(+), 57 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java index 5ac72d70b9cf3..200ff4f6e63d1 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java @@ -216,7 +216,8 @@ public void readFrom(StreamInput in) throws IOException { http = HttpInfo.readHttpInfo(in); } if (in.readBoolean()) { - plugins = PluginsInfo.readPluginsInfo(in); + plugins = new PluginsInfo(); + plugins.readFrom(in); } } diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java index 927a79b6639c4..eefd9f156c2ab 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java @@ -24,77 +24,91 @@ import org.elasticsearch.common.io.stream.Streamable; import org.elasticsearch.common.xcontent.ToXContent; import org.elasticsearch.common.xcontent.XContentBuilder; -import org.elasticsearch.common.xcontent.XContentBuilderString; import org.elasticsearch.plugins.PluginInfo; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; -import java.util.Comparator; import java.util.List; +/** + * Information about plugins and modules + */ public class PluginsInfo implements Streamable, ToXContent { - static final class Fields { - static final XContentBuilderString PLUGINS = new XContentBuilderString("plugins"); - } - - private List infos; + private List plugins; + private List modules; public PluginsInfo() { - infos = new ArrayList<>(); + plugins = new ArrayList<>(); + modules = new ArrayList<>(); } - public PluginsInfo(int size) { - infos = new ArrayList<>(size); + /** + * Returns an ordered list based on plugins name + */ + public List getPluginInfos() { + List plugins = new ArrayList<>(this.plugins); + Collections.sort(plugins, (p1, p2) -> p1.getName().compareTo(p2.getName())); + return plugins; } - + /** - * @return an ordered list based on plugins name + * Returns an ordered list based on modules name */ - public List getInfos() { - Collections.sort(infos, new Comparator() { - @Override - public int compare(final PluginInfo o1, final PluginInfo o2) { - return o1.getName().compareTo(o2.getName()); - } - }); - - return infos; + public List getModuleInfos() { + List modules = new ArrayList<>(this.modules); + Collections.sort(modules, (p1, p2) -> p1.getName().compareTo(p2.getName())); + return modules; } - public void add(PluginInfo info) { - infos.add(info); + public void addPlugin(PluginInfo info) { + plugins.add(info); } - - public static PluginsInfo readPluginsInfo(StreamInput in) throws IOException { - PluginsInfo infos = new PluginsInfo(); - infos.readFrom(in); - return infos; + + public void addModule(PluginInfo info) { + modules.add(info); } @Override public void readFrom(StreamInput in) throws IOException { + if (plugins.isEmpty() == false || modules.isEmpty() == false) { + throw new IllegalStateException("instance is already populated"); + } int plugins_size = in.readInt(); for (int i = 0; i < plugins_size; i++) { - infos.add(PluginInfo.readFromStream(in)); + plugins.add(PluginInfo.readFromStream(in)); + } + int modules_size = in.readInt(); + for (int i = 0; i < modules_size; i++) { + modules.add(PluginInfo.readFromStream(in)); } } @Override public void writeTo(StreamOutput out) throws IOException { - out.writeInt(infos.size()); - for (PluginInfo plugin : getInfos()) { + out.writeInt(plugins.size()); + for (PluginInfo plugin : getPluginInfos()) { plugin.writeTo(out); } + out.writeInt(modules.size()); + for (PluginInfo module : getModuleInfos()) { + module.writeTo(out); + } } @Override public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException { - builder.startArray(Fields.PLUGINS); - for (PluginInfo pluginInfo : getInfos()) { + builder.startArray("plugins"); + for (PluginInfo pluginInfo : getPluginInfos()) { pluginInfo.toXContent(builder, params); } builder.endArray(); + // TODO: not ideal, make a better api for this (e.g. with jar metadata, and so on) + builder.startArray("modules"); + for (PluginInfo moduleInfo : getModuleInfos()) { + moduleInfo.toXContent(builder, params); + } + builder.endArray(); return builder; } diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java index dccf05691232e..fa7dff3e7e5aa 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/stats/ClusterStatsNodes.java @@ -74,7 +74,7 @@ public ClusterStatsNodes(ClusterStatsNodeResponse[] nodeResponses) { versions.add(nodeResponse.nodeInfo().getVersion()); process.addNodeStats(nodeResponse.nodeStats()); jvm.addNodeInfoStats(nodeResponse.nodeInfo(), nodeResponse.nodeStats()); - plugins.addAll(nodeResponse.nodeInfo().getPlugins().getInfos()); + plugins.addAll(nodeResponse.nodeInfo().getPlugins().getPluginInfos()); // now do the stats that should be deduped by hardware (implemented by ip deduping) TransportAddress publishAddress = nodeResponse.nodeInfo().getTransport().address().publishAddress(); diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 9f245f9ef434e..0d602aae08e42 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -37,8 +37,8 @@ import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.index.IndexModule; -import java.io.Closeable; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -66,7 +66,7 @@ public class PluginsService extends AbstractComponent { /** - * We keep around a list of plugins + * We keep around a list of plugins and modules */ private final List> plugins; private final PluginsInfo info; @@ -92,8 +92,9 @@ static class OnModuleReference { */ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDirectory, Collection> classpathPlugins) { super(settings); + info = new PluginsInfo(); - List> tupleBuilder = new ArrayList<>(); + List> pluginsLoaded = new ArrayList<>(); // first we load plugins that are on the classpath. this is for tests and transport clients for (Class pluginClass : classpathPlugins) { @@ -102,14 +103,19 @@ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDire if (logger.isTraceEnabled()) { logger.trace("plugin loaded from classpath [{}]", pluginInfo); } - tupleBuilder.add(new Tuple<>(pluginInfo, plugin)); + pluginsLoaded.add(new Tuple<>(pluginInfo, plugin)); + info.addPlugin(pluginInfo); } // load modules if (modulesDirectory != null) { try { List bundles = getModuleBundles(modulesDirectory); - tupleBuilder.addAll(loadBundles(bundles)); + List> loaded = loadBundles(bundles); + pluginsLoaded.addAll(loaded); + for (Tuple module : loaded) { + info.addModule(module.v1()); + } } catch (IOException ex) { throw new IllegalStateException("Unable to initialize modules", ex); } @@ -119,17 +125,17 @@ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDire if (pluginsDirectory != null) { try { List bundles = getPluginBundles(pluginsDirectory); - tupleBuilder.addAll(loadBundles(bundles)); + List> loaded = loadBundles(bundles); + pluginsLoaded.addAll(loaded); + for (Tuple plugin : loaded) { + info.addPlugin(plugin.v1()); + } } catch (IOException ex) { throw new IllegalStateException("Unable to initialize plugins", ex); } } - plugins = Collections.unmodifiableList(tupleBuilder); - info = new PluginsInfo(); - for (Tuple tuple : plugins) { - info.add(tuple.v1()); - } + plugins = Collections.unmodifiableList(pluginsLoaded); // We need to build a List of jvm and site plugins for checking mandatory plugins Map jvmPlugins = new HashMap<>(); diff --git a/core/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java b/core/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java index 058a93bf6b98b..b52f8e6fc10a0 100644 --- a/core/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java +++ b/core/src/main/java/org/elasticsearch/rest/action/cat/RestPluginsAction.java @@ -95,7 +95,7 @@ private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoR for (DiscoveryNode node : nodes) { NodeInfo info = nodesInfo.getNodesMap().get(node.id()); - for (PluginInfo pluginInfo : info.getPlugins().getInfos()) { + for (PluginInfo pluginInfo : info.getPlugins().getPluginInfos()) { table.startRow(); table.addCell(node.id()); table.addCell(node.name()); diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java index 01c1bbfc6e005..b840d8662859b 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java @@ -273,12 +273,12 @@ public void testReadFromPropertiesSitePluginWithoutSite() throws Exception { } public void testPluginListSorted() { - PluginsInfo pluginsInfo = new PluginsInfo(5); - pluginsInfo.add(new PluginInfo("c", "foo", true, "dummy", true, "dummyclass", true)); - pluginsInfo.add(new PluginInfo("b", "foo", true, "dummy", true, "dummyclass", true)); - pluginsInfo.add(new PluginInfo("e", "foo", true, "dummy", true, "dummyclass", true)); - pluginsInfo.add(new PluginInfo("a", "foo", true, "dummy", true, "dummyclass", true)); - pluginsInfo.add(new PluginInfo("d", "foo", true, "dummy", true, "dummyclass", true)); + PluginsInfo pluginsInfo = new PluginsInfo(); + pluginsInfo.addPlugin(new PluginInfo("c", "foo", true, "dummy", true, "dummyclass", true)); + pluginsInfo.addPlugin(new PluginInfo("b", "foo", true, "dummy", true, "dummyclass", true)); + pluginsInfo.addPlugin(new PluginInfo("e", "foo", true, "dummy", true, "dummyclass", true)); + pluginsInfo.addPlugin(new PluginInfo("a", "foo", true, "dummy", true, "dummyclass", true)); + pluginsInfo.addPlugin(new PluginInfo("d", "foo", true, "dummy", true, "dummyclass", true)); final List infos = pluginsInfo.getInfos(); List names = eagerTransform(infos, new Function() { diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index 5db9a44621399..5c2c3137047d5 100644 --- a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -782,12 +782,20 @@ public static void assertNodeContainsPlugins(NodesInfoResponse response, String } } +<<<<<<< HEAD:core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java private static Predicate jvmPluginPredicate = new Predicate() { @Override public boolean apply(PluginInfo pluginInfo) { return pluginInfo.isJvm(); } }; +======= + private static List filterAndMap(PluginsInfo pluginsInfo, Predicate predicate, Function function) { + return pluginsInfo.getPluginInfos().stream().filter(predicate).map(function).collect(Collectors.toList()); + } + + private static Predicate jvmPluginPredicate = p -> p.isJvm(); +>>>>>>> 7160c5e... list modules separately in pluginservice:test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java private static Predicate sitePluginPredicate = new Predicate() { @Override diff --git a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml index 9c7819d925d42..1550f2a7f8143 100644 --- a/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml +++ b/modules/lang-expression/src/test/resources/rest-api-spec/test/lang_expression/10_basic.yaml @@ -10,5 +10,5 @@ - do: nodes.info: {} - - match: { nodes.$master.plugins.0.name: lang-expression } - - match: { nodes.$master.plugins.0.jvm: true } + - match: { nodes.$master.modules.0.name: lang-expression } + - match: { nodes.$master.modules.0.jvm: true } diff --git a/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml index 123b02fc7fab3..c276bab649576 100644 --- a/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml +++ b/modules/lang-groovy/src/test/resources/rest-api-spec/test/lang_groovy/10_basic.yaml @@ -10,5 +10,5 @@ - do: nodes.info: {} - - match: { nodes.$master.plugins.0.name: lang-groovy } - - match: { nodes.$master.plugins.0.jvm: true } + - match: { nodes.$master.modules.0.name: lang-groovy } + - match: { nodes.$master.modules.0.jvm: true } From a98d7b45a220ac6eaa2601c26a4b0d791c088da3 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 4 Dec 2015 01:43:07 -0500 Subject: [PATCH 09/23] update lists, rename stuff to be clearer, remove public method that is unused --- .../action/admin/cluster/node/info/NodeInfo.java | 8 ++++---- .../{PluginsInfo.java => PluginsAndModules.java} | 4 ++-- .../org/elasticsearch/plugins/PluginsService.java | 12 ++++++------ .../org/elasticsearch/plugins/plugin-install.help | 2 -- .../org/elasticsearch/plugins/PluginInfoTests.java | 4 ++-- .../org/elasticsearch/plugins/PluginManagerIT.java | 2 -- .../test/hamcrest/ElasticsearchAssertions.java | 7 +++---- 7 files changed, 17 insertions(+), 22 deletions(-) rename core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/{PluginsInfo.java => PluginsAndModules.java} (97%) diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java index 200ff4f6e63d1..5d79467e67551 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/NodeInfo.java @@ -71,14 +71,14 @@ public class NodeInfo extends BaseNodeResponse { private HttpInfo http; @Nullable - private PluginsInfo plugins; + private PluginsAndModules plugins; NodeInfo() { } public NodeInfo(Version version, Build build, DiscoveryNode node, @Nullable ImmutableMap serviceAttributes, @Nullable Settings settings, @Nullable OsInfo os, @Nullable ProcessInfo process, @Nullable JvmInfo jvm, @Nullable ThreadPoolInfo threadPool, - @Nullable TransportInfo transport, @Nullable HttpInfo http, @Nullable PluginsInfo plugins) { + @Nullable TransportInfo transport, @Nullable HttpInfo http, @Nullable PluginsAndModules plugins) { super(node); this.version = version; this.build = build; @@ -171,7 +171,7 @@ public HttpInfo getHttp() { } @Nullable - public PluginsInfo getPlugins() { + public PluginsAndModules getPlugins() { return this.plugins; } @@ -216,7 +216,7 @@ public void readFrom(StreamInput in) throws IOException { http = HttpInfo.readHttpInfo(in); } if (in.readBoolean()) { - plugins = new PluginsInfo(); + plugins = new PluginsAndModules(); plugins.readFrom(in); } } diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java similarity index 97% rename from core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java rename to core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java index eefd9f156c2ab..3831fd24f3edd 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsInfo.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java @@ -34,11 +34,11 @@ /** * Information about plugins and modules */ -public class PluginsInfo implements Streamable, ToXContent { +public class PluginsAndModules implements Streamable, ToXContent { private List plugins; private List modules; - public PluginsInfo() { + public PluginsAndModules() { plugins = new ArrayList<>(); modules = new ArrayList<>(); } diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 0d602aae08e42..3e2e7bd328d2e 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -26,7 +26,7 @@ import org.apache.lucene.codecs.DocValuesFormat; import org.apache.lucene.codecs.PostingsFormat; import org.elasticsearch.ElasticsearchException; -import org.elasticsearch.action.admin.cluster.node.info.PluginsInfo; +import org.elasticsearch.action.admin.cluster.node.info.PluginsAndModules; import org.elasticsearch.bootstrap.JarHell; import org.elasticsearch.common.Strings; import org.elasticsearch.common.collect.Tuple; @@ -69,7 +69,7 @@ public class PluginsService extends AbstractComponent { * We keep around a list of plugins and modules */ private final List> plugins; - private final PluginsInfo info; + private final PluginsAndModules info; private final Map> onModuleReferences; @@ -92,7 +92,7 @@ static class OnModuleReference { */ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDirectory, Collection> classpathPlugins) { super(settings); - info = new PluginsInfo(); + info = new PluginsAndModules(); List> pluginsLoaded = new ArrayList<>(); @@ -192,7 +192,7 @@ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDire this.onModuleReferences = Collections.unmodifiableMap(onModuleReferences); } - public List> plugins() { + private List> plugins() { return plugins; } @@ -290,9 +290,9 @@ public Collection> shardServices() { } /** - * Get information about plugins (jvm and site plugins). + * Get information about plugins and modules */ - public PluginsInfo info() { + public PluginsAndModules info() { return info; } diff --git a/core/src/main/resources/org/elasticsearch/plugins/plugin-install.help b/core/src/main/resources/org/elasticsearch/plugins/plugin-install.help index 2429182495487..16a92abc87200 100644 --- a/core/src/main/resources/org/elasticsearch/plugins/plugin-install.help +++ b/core/src/main/resources/org/elasticsearch/plugins/plugin-install.help @@ -43,8 +43,6 @@ OFFICIAL PLUGINS - cloud-gce - delete-by-query - discovery-multicast - - lang-expression - - lang-groovy - lang-javascript - lang-python - mapper-attachments diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java index b840d8662859b..af6fa01e8f506 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java @@ -21,7 +21,7 @@ import com.google.common.base.Function; import org.elasticsearch.Version; -import org.elasticsearch.action.admin.cluster.node.info.PluginsInfo; +import org.elasticsearch.action.admin.cluster.node.info.PluginsAndModules; import org.elasticsearch.test.ESTestCase; import java.io.IOException; @@ -273,7 +273,7 @@ public void testReadFromPropertiesSitePluginWithoutSite() throws Exception { } public void testPluginListSorted() { - PluginsInfo pluginsInfo = new PluginsInfo(); + PluginsAndModules pluginsInfo = new PluginsAndModules(); pluginsInfo.addPlugin(new PluginInfo("c", "foo", true, "dummy", true, "dummyclass", true)); pluginsInfo.addPlugin(new PluginInfo("b", "foo", true, "dummy", true, "dummyclass", true)); pluginsInfo.addPlugin(new PluginInfo("e", "foo", true, "dummy", true, "dummyclass", true)); diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java index ce55b6a908ead..b1d0d3bb34d50 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginManagerIT.java @@ -635,8 +635,6 @@ public void testOfficialPluginName_ThrowsException() throws IOException { PluginManager.checkForOfficialPlugins("cloud-azure"); PluginManager.checkForOfficialPlugins("cloud-gce"); PluginManager.checkForOfficialPlugins("delete-by-query"); - PluginManager.checkForOfficialPlugins("lang-expression"); - PluginManager.checkForOfficialPlugins("lang-groovy"); PluginManager.checkForOfficialPlugins("lang-javascript"); PluginManager.checkForOfficialPlugins("lang-python"); PluginManager.checkForOfficialPlugins("mapper-attachments"); diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index 5c2c3137047d5..78ccb2d54d05e 100644 --- a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -37,6 +37,7 @@ import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.action.admin.cluster.node.info.PluginsInfo; +import org.elasticsearch.action.admin.cluster.node.info.PluginsAndModules; import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequestBuilder; import org.elasticsearch.action.admin.indices.delete.DeleteIndexResponse; @@ -735,7 +736,7 @@ public static void assertNodeContainsPlugins(NodesInfoResponse response, String Assert.assertThat(response.getNodesMap().get(nodeId), notNullValue()); - PluginsInfo plugins = response.getNodesMap().get(nodeId).getPlugins(); + PluginsAndModules plugins = response.getNodesMap().get(nodeId).getPlugins(); Assert.assertThat(plugins, notNullValue()); List pluginNames = FluentIterable.from(plugins.getInfos()).filter(jvmPluginPredicate).transform(nameFunction).toList(); @@ -782,20 +783,18 @@ public static void assertNodeContainsPlugins(NodesInfoResponse response, String } } -<<<<<<< HEAD:core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java private static Predicate jvmPluginPredicate = new Predicate() { @Override public boolean apply(PluginInfo pluginInfo) { return pluginInfo.isJvm(); } }; -======= + private static List filterAndMap(PluginsInfo pluginsInfo, Predicate predicate, Function function) { return pluginsInfo.getPluginInfos().stream().filter(predicate).map(function).collect(Collectors.toList()); } private static Predicate jvmPluginPredicate = p -> p.isJvm(); ->>>>>>> 7160c5e... list modules separately in pluginservice:test-framework/src/main/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java private static Predicate sitePluginPredicate = new Predicate() { @Override From 568c2bb0ae5f19f730a90e37552e377716963901 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 4 Dec 2015 02:23:34 -0500 Subject: [PATCH 10/23] improve logger output on startup --- .../org/elasticsearch/plugins/PluginsService.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 3e2e7bd328d2e..498cdf5e7126c 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -165,7 +165,18 @@ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDire } } - logger.info("loaded {}, sites {}", jvmPlugins.keySet(), sitePlugins); + // we don't log jars in lib/ we really shouldnt log modules, + // but for now: just be transparent so we can debug any potential issues + Set moduleNames = new HashSet<>(); + Set jvmPluginNames = new HashSet<>(); + for (PluginInfo moduleInfo : info.getModuleInfos()) { + moduleNames.add(moduleInfo.getName()); + } + for (PluginInfo pluginInfo : info.getPluginInfos()) { + jvmPluginNames.add(pluginInfo.getName()); + } + + logger.info("modules {}, plugins {}, sites {}", moduleNames, jvmPluginNames, sitePlugins); Map> onModuleReferences = new HashMap<>(); for (Plugin plugin : jvmPlugins.values()) { From d9fe425b394945314817a3be8d098867a4e5a17d Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 4 Dec 2015 02:38:56 -0500 Subject: [PATCH 11/23] fix broken plugin warning --- .../main/java/org/elasticsearch/plugins/PluginsService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index 498cdf5e7126c..cdb147ab9ba2a 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -185,6 +185,10 @@ public PluginsService(Settings settings, Path modulesDirectory, Path pluginsDire if (!method.getName().equals("onModule")) { continue; } + // this is a deprecated final method, so all Plugin subclasses have it + if (method.getParameterTypes().length == 1 && method.getParameterTypes()[0].equals(IndexModule.class)) { + continue; + } if (method.getParameterTypes().length == 0 || method.getParameterTypes().length > 1) { logger.warn("Plugin: {} implementing onModule with no parameters or more than one parameter", plugin.name()); continue; From 038e6245bd2fd33d8257828ac162a276400ca30b Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 4 Dec 2015 03:25:43 -0500 Subject: [PATCH 12/23] fix bats tests --- .../packaging/scripts/20_tar_package.bats | 1 - .../packaging/scripts/30_deb_package.bats | 1 - .../packaging/scripts/40_rpm_package.bats | 1 - .../resources/packaging/scripts/60_systemd.bats | 1 - .../packaging/scripts/70_sysv_initd.bats | 1 - .../packaging/scripts/plugin_test_cases.bash | 16 ---------------- 6 files changed, 21 deletions(-) diff --git a/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats index 383375f9531c3..f6a9b22ec3b01 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/20_tar_package.bats @@ -92,7 +92,6 @@ setup() { # starting Elasticsearch so we don't have to wait for elasticsearch to scan for # them. install_elasticsearch_test_scripts - ESPLUGIN_COMMAND_USER=elasticsearch install_and_check_plugin lang groovy start_elasticsearch_service run_elasticsearch_tests stop_elasticsearch_service diff --git a/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats index 553f867f60d97..048b208105e2d 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/30_deb_package.bats @@ -86,7 +86,6 @@ setup() { # starting Elasticsearch so we don't have to wait for elasticsearch to scan for # them. install_elasticsearch_test_scripts - ESPLUGIN_COMMAND_USER=root install_and_check_plugin lang groovy start_elasticsearch_service run_elasticsearch_tests } diff --git a/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats b/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats index 7f447e51cb3be..d27622ffdda3d 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/40_rpm_package.bats @@ -81,7 +81,6 @@ setup() { # starting Elasticsearch so we don't have to wait for elasticsearch to scan for # them. install_elasticsearch_test_scripts - ESPLUGIN_COMMAND_USER=root install_and_check_plugin lang groovy start_elasticsearch_service run_elasticsearch_tests } diff --git a/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats b/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats index 6558a3831b35f..da7b6a180f1a8 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/60_systemd.bats @@ -68,7 +68,6 @@ setup() { # starting Elasticsearch so we don't have to wait for elasticsearch to scan for # them. install_elasticsearch_test_scripts - ESPLUGIN_COMMAND_USER=root install_and_check_plugin lang groovy systemctl start elasticsearch.service wait_for_elasticsearch_status assert_file_exist "/var/run/elasticsearch/elasticsearch.pid" diff --git a/qa/vagrant/src/test/resources/packaging/scripts/70_sysv_initd.bats b/qa/vagrant/src/test/resources/packaging/scripts/70_sysv_initd.bats index 1c5cce5917451..fad764eb7117c 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/70_sysv_initd.bats +++ b/qa/vagrant/src/test/resources/packaging/scripts/70_sysv_initd.bats @@ -70,7 +70,6 @@ setup() { # Install scripts used to test script filters and search templates before # starting Elasticsearch so we don't have to wait for elasticsearch to scan for # them. - ESPLUGIN_COMMAND_USER=root install_and_check_plugin lang groovy install_elasticsearch_test_scripts service elasticsearch start wait_for_elasticsearch_status diff --git a/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash b/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash index b5e80da157243..ce3add4d00bed 100644 --- a/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash +++ b/qa/vagrant/src/test/resources/packaging/scripts/plugin_test_cases.bash @@ -223,14 +223,6 @@ fi install_and_check_plugin discovery multicast } -@test "[$GROUP] install lang-expression plugin" { - install_and_check_plugin lang expression -} - -@test "[$GROUP] install lang-groovy plugin" { - install_and_check_plugin lang groovy -} - @test "[$GROUP] install javascript plugin" { install_and_check_plugin lang javascript rhino-*.jar } @@ -319,14 +311,6 @@ fi remove_plugin discovery-multicast } -@test "[$GROUP] remove lang-expression plugin" { - remove_plugin lang-expression -} - -@test "[$GROUP] remove lang-groovy plugin" { - remove_plugin lang-groovy -} - @test "[$GROUP] remove javascript plugin" { remove_plugin lang-javascript } From f054698486edfc1a75f916aaf73692e918f998be Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 19:45:22 -0500 Subject: [PATCH 13/23] re-arrange --- plugins/pom.xml | 2 -- pom.xml | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/pom.xml b/plugins/pom.xml index e498d93e66b53..2e5553bd6fa10 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -424,8 +424,6 @@ cloud-aws delete-by-query discovery-multicast - lang-expression - lang-groovy lang-javascript lang-python mapper-attachments diff --git a/pom.xml b/pom.xml index b81079c25c701..4c5da26edf8c1 100644 --- a/pom.xml +++ b/pom.xml @@ -1499,6 +1499,7 @@ org.eclipse.jdt.ui.text.custom_code_templates=dev-tools rest-api-spec core + modules distribution plugins qa From 01be1144137fbb41b31af908183eac9889fcc046 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 19:47:28 -0500 Subject: [PATCH 14/23] add shitton of xml --- modules/pom.xml | 420 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 420 insertions(+) create mode 100644 modules/pom.xml diff --git a/modules/pom.xml b/modules/pom.xml new file mode 100644 index 0000000000000..bfed644d37ab5 --- /dev/null +++ b/modules/pom.xml @@ -0,0 +1,420 @@ + + + + 4.0.0 + + org.elasticsearch.module + modules + 2.2.0-SNAPSHOT + pom + Module: Parent POM + 2009 + A parent project for Elasticsearch modules (Internal) + + + org.elasticsearch + parent + 2.2.0-SNAPSHOT + + + + ${elasticsearch.tools.directory}/plugin-metadata/plugin-assembly.xml + false + ${project.artifactId} + true + true + false + + + + + + org.hamcrest + hamcrest-all + test + + + org.apache.lucene + lucene-test-framework + test + + + org.elasticsearch + elasticsearch + test-jar + test + + + + + org.elasticsearch + elasticsearch + provided + + + org.apache.lucene + lucene-core + provided + + + org.apache.lucene + lucene-backward-codecs + provided + + + org.apache.lucene + lucene-analyzers-common + provided + + + org.apache.lucene + lucene-queries + provided + + + org.apache.lucene + lucene-memory + provided + + + org.apache.lucene + lucene-highlighter + provided + + + org.apache.lucene + lucene-queryparser + provided + + + org.apache.lucene + lucene-suggest + provided + + + org.apache.lucene + lucene-join + provided + + + org.apache.lucene + lucene-spatial + provided + + + com.spatial4j + spatial4j + provided + + + com.vividsolutions + jts + provided + + + com.github.spullara.mustache.java + compiler + provided + + + com.google.guava + guava + provided + + + com.carrotsearch + hppc + provided + + + joda-time + joda-time + provided + + + org.joda + joda-convert + provided + + + com.fasterxml.jackson.core + jackson-core + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-smile + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + provided + + + com.fasterxml.jackson.dataformat + jackson-dataformat-cbor + provided + + + io.netty + netty + provided + + + com.ning + compress-lzf + provided + + + com.tdunning + t-digest + provided + + + commons-cli + commons-cli + provided + + + log4j + log4j + provided + + + log4j + apache-log4j-extras + provided + + + org.slf4j + slf4j-api + provided + + + net.java.dev.jna + jna + provided + + + + + + org.apache.httpcomponents + httpclient + test + + + + + + + + src/test/resources + + **/* + + + + + ${elasticsearch.tools.directory}/rest-api-spec + rest-api-spec + + + api/info.json + api/cluster.health.json + api/cluster.state.json + + api/index.json + api/get.json + api/get_script.json + api/put_script.json + api/delete_script.json + api/update.json + api/search.json + api/indices.analyze.json + api/indices.create.json + api/indices.refresh.json + api/nodes.info.json + api/count.json + + api/snapshot.create_repository.json + api/snapshot.get_repository.json + + + + + ${elasticsearch.tools.directory}/shared-test-resources + false + + + + ${basedir}/target/metadata-test-resources + false + + + + + + + maven-resources-plugin + + + copy-resources + + generate-resources + + copy-resources + + + ${basedir}/target/metadata-test-resources + + + src/main/plugin-metadata + false + + + ${elasticsearch.tools.directory}/plugin-metadata + true + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + integ-setup + pre-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + + + integ-teardown + post-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + ${elasticsearch.assembly.appendId} + ${project.build.directory}/releases/ + + ${elasticsearch.assembly.descriptor} + + + + + package + + single + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-plugin-classname + + enforce + + + + + elasticsearch.plugin.classname + elasticsearch.plugin.name + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + integ-setup-dependencies + pre-integration-test + + copy + + + ${skip.integ.tests} + + + org.elasticsearch.distribution.zip + elasticsearch + ${elasticsearch.version} + zip + true + + + true + ${integ.deps} + + + + + + com.carrotsearch.randomizedtesting + junit4-maven-plugin + + + integ-tests + + + 1 + + + localhost:${integ.transport.port} + + + + + + + + + + + lang-expression + lang-groovy + + From 85f4818e7d62dd2b988f88496f50fefdca13c8ad Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 19:51:30 -0500 Subject: [PATCH 15/23] fix to have correct parents --- modules/lang-expression/pom.xml | 6 +++--- modules/lang-groovy/pom.xml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/lang-expression/pom.xml b/modules/lang-expression/pom.xml index 907de74431cb2..791dacc364e51 100644 --- a/modules/lang-expression/pom.xml +++ b/modules/lang-expression/pom.xml @@ -5,13 +5,13 @@ 4.0.0 - org.elasticsearch.plugin - plugins + org.elasticsearch.module + modules 2.2.0-SNAPSHOT lang-expression - Plugin: Language: Expression + Module: Language: Expression Lucene expressions integration for Elasticsearch diff --git a/modules/lang-groovy/pom.xml b/modules/lang-groovy/pom.xml index 0c592c4e39bb3..376fd8849f1ff 100644 --- a/modules/lang-groovy/pom.xml +++ b/modules/lang-groovy/pom.xml @@ -5,13 +5,13 @@ 4.0.0 - org.elasticsearch.plugin - plugins + org.elasticsearch.module + modules 2.2.0-SNAPSHOT lang-groovy - Plugin: Language: Groovy + Module: Language: Groovy Groovy scripting integration for Elasticsearch From 507dae07a1a19c908dfc8d8a819b4728761948e4 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 19:57:11 -0500 Subject: [PATCH 16/23] remove duplication --- plugins/pom.xml | 356 +----------------------------------------------- 1 file changed, 3 insertions(+), 353 deletions(-) diff --git a/plugins/pom.xml b/plugins/pom.xml index 2e5553bd6fa10..4608209694d92 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -14,277 +14,15 @@ A parent project for Elasticsearch plugins - org.elasticsearch - parent + org.elasticsearch.module + modules 2.2.0-SNAPSHOT + ../modules/pom.xml - - ${elasticsearch.tools.directory}/plugin-metadata/plugin-assembly.xml - false - ${project.artifactId} - true - true - false - - - - - - org.hamcrest - hamcrest-all - test - - - org.apache.lucene - lucene-test-framework - test - - - org.elasticsearch - elasticsearch - test-jar - test - - - - - org.elasticsearch - elasticsearch - provided - - - org.apache.lucene - lucene-core - provided - - - org.apache.lucene - lucene-backward-codecs - provided - - - org.apache.lucene - lucene-analyzers-common - provided - - - org.apache.lucene - lucene-queries - provided - - - org.apache.lucene - lucene-memory - provided - - - org.apache.lucene - lucene-highlighter - provided - - - org.apache.lucene - lucene-queryparser - provided - - - org.apache.lucene - lucene-suggest - provided - - - org.apache.lucene - lucene-join - provided - - - org.apache.lucene - lucene-spatial - provided - - - com.spatial4j - spatial4j - provided - - - com.vividsolutions - jts - provided - - - com.github.spullara.mustache.java - compiler - provided - - - com.google.guava - guava - provided - - - com.carrotsearch - hppc - provided - - - joda-time - joda-time - provided - - - org.joda - joda-convert - provided - - - com.fasterxml.jackson.core - jackson-core - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-smile - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - provided - - - com.fasterxml.jackson.dataformat - jackson-dataformat-cbor - provided - - - io.netty - netty - provided - - - com.ning - compress-lzf - provided - - - com.tdunning - t-digest - provided - - - commons-cli - commons-cli - provided - - - log4j - log4j - provided - - - log4j - apache-log4j-extras - provided - - - org.slf4j - slf4j-api - provided - - - net.java.dev.jna - jna - provided - - - - - - org.apache.httpcomponents - httpclient - test - - - - - - src/test/resources - - **/* - - - - - ${elasticsearch.tools.directory}/rest-api-spec - rest-api-spec - - - api/info.json - api/cluster.health.json - api/cluster.state.json - - api/index.json - api/get.json - api/get_script.json - api/put_script.json - api/delete_script.json - api/update.json - api/search.json - api/indices.analyze.json - api/indices.create.json - api/indices.refresh.json - api/nodes.info.json - api/count.json - - api/snapshot.create_repository.json - api/snapshot.get_repository.json - - - - - ${elasticsearch.tools.directory}/shared-test-resources - false - - - - ${basedir}/target/metadata-test-resources - false - - - - - - maven-resources-plugin - - - copy-resources - - generate-resources - - copy-resources - - - ${basedir}/target/metadata-test-resources - - - src/main/plugin-metadata - false - - - ${elasticsearch.tools.directory}/plugin-metadata - true - - - - - - org.apache.maven.plugins @@ -323,94 +61,6 @@ - - - - - org.apache.maven.plugins - maven-assembly-plugin - - ${elasticsearch.assembly.appendId} - ${project.build.directory}/releases/ - - ${elasticsearch.assembly.descriptor} - - - - - package - - single - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - - - enforce-plugin-classname - - enforce - - - - - elasticsearch.plugin.classname - elasticsearch.plugin.name - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - integ-setup-dependencies - pre-integration-test - - copy - - - ${skip.integ.tests} - - - org.elasticsearch.distribution.zip - elasticsearch - ${elasticsearch.version} - zip - true - - - true - ${integ.deps} - - - - - - com.carrotsearch.randomizedtesting - junit4-maven-plugin - - - integ-tests - - - 1 - - - localhost:${integ.transport.port} - - - - - - - From 1d2204e44dfd4e68ecd8ed1478be758a861e4f9b Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 20:09:43 -0500 Subject: [PATCH 17/23] switch to integ zip (we shall see how this works) --- distribution/integ-test-zip/pom.xml | 103 ++++++++++++++++++ .../src/main/assemblies/zip-bin.xml | 13 +++ distribution/pom.xml | 1 + modules/pom.xml | 11 +- 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 distribution/integ-test-zip/pom.xml create mode 100644 distribution/integ-test-zip/src/main/assemblies/zip-bin.xml diff --git a/distribution/integ-test-zip/pom.xml b/distribution/integ-test-zip/pom.xml new file mode 100644 index 0000000000000..5b60d92f98a32 --- /dev/null +++ b/distribution/integ-test-zip/pom.xml @@ -0,0 +1,103 @@ + + + 4.0.0 + + org.elasticsearch.distribution + distributions + 2.2.0-SNAPSHOT + + + org.elasticsearch.distribution.test + elasticsearch + Integration Test Package: ZIP + + + A stripped down Elasticsearch for test purposes only + + + + ${project.basedir}/../src/main/packaging/packaging.properties + + + + + org.apache.maven.plugins + maven-assembly-plugin + + false + ${project.build.directory}/releases/ + + ${project.basedir}/src/main/assemblies/zip-bin.xml + + + + + package + + single + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + + + execute + package + + run + + + + + + + + + + + + + + integ-setup + pre-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + + + integ-teardown + post-integration-test + + run + + + ${skip.integ.tests} + + + + + + + + + + diff --git a/distribution/integ-test-zip/src/main/assemblies/zip-bin.xml b/distribution/integ-test-zip/src/main/assemblies/zip-bin.xml new file mode 100644 index 0000000000000..661d5540cf72d --- /dev/null +++ b/distribution/integ-test-zip/src/main/assemblies/zip-bin.xml @@ -0,0 +1,13 @@ + + + zip + + zip + + + true + + + ../src/main/assemblies/common-bin.xml + + diff --git a/distribution/pom.xml b/distribution/pom.xml index cf1f0e12cb585..e9b51eb3f7c7c 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -214,6 +214,7 @@ + integ-test-zip tar zip deb diff --git a/modules/pom.xml b/modules/pom.xml index bfed644d37ab5..66aa746faf1db 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -206,6 +206,15 @@ httpclient test + + + + org.elasticsearch.distribution.test + elasticsearch + ${elasticsearch.version} + zip + test + @@ -379,7 +388,7 @@ ${skip.integ.tests} - org.elasticsearch.distribution.zip + org.elasticsearch.distribution.test elasticsearch ${elasticsearch.version} zip From 6bd70d45e52f8e385679322cce4f6172e64b64ff Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 20:17:48 -0500 Subject: [PATCH 18/23] fix compile --- .../cluster/node/info/PluginsAndModules.java | 15 ++++++++++-- .../elasticsearch/plugins/PluginManager.java | 4 ++-- .../elasticsearch/plugins/PluginsService.java | 1 + .../plugins/PluginInfoTests.java | 2 +- .../hamcrest/ElasticsearchAssertions.java | 23 +++++++------------ 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java index 3831fd24f3edd..ee3b0c619e6ee 100644 --- a/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java +++ b/core/src/main/java/org/elasticsearch/action/admin/cluster/node/info/PluginsAndModules.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.Collections; +import java.util.Comparator; import java.util.List; /** @@ -48,7 +49,12 @@ public PluginsAndModules() { */ public List getPluginInfos() { List plugins = new ArrayList<>(this.plugins); - Collections.sort(plugins, (p1, p2) -> p1.getName().compareTo(p2.getName())); + Collections.sort(plugins, new Comparator() { + @Override + public int compare(PluginInfo p1, PluginInfo p2) { + return p1.getName().compareTo(p2.getName()); + } + }); return plugins; } @@ -57,7 +63,12 @@ public List getPluginInfos() { */ public List getModuleInfos() { List modules = new ArrayList<>(this.modules); - Collections.sort(modules, (p1, p2) -> p1.getName().compareTo(p2.getName())); + Collections.sort(modules, new Comparator() { + @Override + public int compare(PluginInfo p1, PluginInfo p2) { + return p1.getName().compareTo(p2.getName()); + } + }); return modules; } diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java index 09d37b8679578..af95a762ab4f1 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java @@ -66,9 +66,9 @@ public enum OutputMode { "plugin.bat", "service.bat").build(); - static final Set MODULES = unmodifiableSet(newHashSet( + static final Set MODULES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( "lang-expression", - "lang-groovy")); + "lang-groovy"))); static final ImmutableSet OFFICIAL_PLUGINS = ImmutableSet.builder() .add( diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java index cdb147ab9ba2a..b052536166611 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginsService.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginsService.java @@ -39,6 +39,7 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.IndexModule; +import java.io.Closeable; import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java index af6fa01e8f506..6ddc3b3ad264a 100644 --- a/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java +++ b/core/src/test/java/org/elasticsearch/plugins/PluginInfoTests.java @@ -280,7 +280,7 @@ public void testPluginListSorted() { pluginsInfo.addPlugin(new PluginInfo("a", "foo", true, "dummy", true, "dummyclass", true)); pluginsInfo.addPlugin(new PluginInfo("d", "foo", true, "dummy", true, "dummyclass", true)); - final List infos = pluginsInfo.getInfos(); + final List infos = pluginsInfo.getPluginInfos(); List names = eagerTransform(infos, new Function() { @Override public String apply(PluginInfo input) { diff --git a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java index 78ccb2d54d05e..049292c695c01 100644 --- a/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java +++ b/core/src/test/java/org/elasticsearch/test/hamcrest/ElasticsearchAssertions.java @@ -36,7 +36,6 @@ import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse; import org.elasticsearch.action.admin.cluster.node.info.NodesInfoResponse; import org.elasticsearch.plugins.PluginInfo; -import org.elasticsearch.action.admin.cluster.node.info.PluginsInfo; import org.elasticsearch.action.admin.cluster.node.info.PluginsAndModules; import org.elasticsearch.action.admin.indices.alias.exists.AliasesExistResponse; import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequestBuilder; @@ -739,44 +738,44 @@ public static void assertNodeContainsPlugins(NodesInfoResponse response, String PluginsAndModules plugins = response.getNodesMap().get(nodeId).getPlugins(); Assert.assertThat(plugins, notNullValue()); - List pluginNames = FluentIterable.from(plugins.getInfos()).filter(jvmPluginPredicate).transform(nameFunction).toList(); + List pluginNames = FluentIterable.from(plugins.getPluginInfos()).filter(jvmPluginPredicate).transform(nameFunction).toList(); for (String expectedJvmPluginName : expectedJvmPluginNames) { Assert.assertThat(pluginNames, hasItem(expectedJvmPluginName)); } - List pluginDescriptions = FluentIterable.from(plugins.getInfos()).filter(jvmPluginPredicate).transform(descriptionFunction).toList(); + List pluginDescriptions = FluentIterable.from(plugins.getPluginInfos()).filter(jvmPluginPredicate).transform(descriptionFunction).toList(); for (String expectedJvmPluginDescription : expectedJvmPluginDescriptions) { Assert.assertThat(pluginDescriptions, hasItem(expectedJvmPluginDescription)); } - List jvmPluginVersions = FluentIterable.from(plugins.getInfos()).filter(jvmPluginPredicate).transform(versionFunction).toList(); + List jvmPluginVersions = FluentIterable.from(plugins.getPluginInfos()).filter(jvmPluginPredicate).transform(versionFunction).toList(); for (String pluginVersion : expectedJvmVersions) { Assert.assertThat(jvmPluginVersions, hasItem(pluginVersion)); } - FluentIterable jvmUrls = FluentIterable.from(plugins.getInfos()) + FluentIterable jvmUrls = FluentIterable.from(plugins.getPluginInfos()) .filter(Predicates.and(jvmPluginPredicate, Predicates.not(sitePluginPredicate))) .transform(urlFunction) .filter(notNull()); Assert.assertThat(Iterables.size(jvmUrls), is(0)); - List sitePluginNames = FluentIterable.from(plugins.getInfos()).filter(sitePluginPredicate).transform(nameFunction).toList(); + List sitePluginNames = FluentIterable.from(plugins.getPluginInfos()).filter(sitePluginPredicate).transform(nameFunction).toList(); Assert.assertThat(sitePluginNames.isEmpty(), is(expectedSitePluginNames.isEmpty())); for (String expectedSitePluginName : expectedSitePluginNames) { Assert.assertThat(sitePluginNames, hasItem(expectedSitePluginName)); } - List sitePluginDescriptions = FluentIterable.from(plugins.getInfos()).filter(sitePluginPredicate).transform(descriptionFunction).toList(); + List sitePluginDescriptions = FluentIterable.from(plugins.getPluginInfos()).filter(sitePluginPredicate).transform(descriptionFunction).toList(); Assert.assertThat(sitePluginDescriptions.isEmpty(), is(expectedSitePluginDescriptions.isEmpty())); for (String sitePluginDescription : expectedSitePluginDescriptions) { Assert.assertThat(sitePluginDescriptions, hasItem(sitePluginDescription)); } - List sitePluginUrls = FluentIterable.from(plugins.getInfos()).filter(sitePluginPredicate).transform(urlFunction).toList(); + List sitePluginUrls = FluentIterable.from(plugins.getPluginInfos()).filter(sitePluginPredicate).transform(urlFunction).toList(); Assert.assertThat(sitePluginUrls, not(contains(nullValue()))); - List sitePluginVersions = FluentIterable.from(plugins.getInfos()).filter(sitePluginPredicate).transform(versionFunction).toList(); + List sitePluginVersions = FluentIterable.from(plugins.getPluginInfos()).filter(sitePluginPredicate).transform(versionFunction).toList(); Assert.assertThat(sitePluginVersions.isEmpty(), is(expectedSiteVersions.isEmpty())); for (String pluginVersion : expectedSiteVersions) { Assert.assertThat(sitePluginVersions, hasItem(pluginVersion)); @@ -790,12 +789,6 @@ public boolean apply(PluginInfo pluginInfo) { } }; - private static List filterAndMap(PluginsInfo pluginsInfo, Predicate predicate, Function function) { - return pluginsInfo.getPluginInfos().stream().filter(predicate).map(function).collect(Collectors.toList()); - } - - private static Predicate jvmPluginPredicate = p -> p.isJvm(); - private static Predicate sitePluginPredicate = new Predicate() { @Override public boolean apply(PluginInfo pluginInfo) { From 3be2ed1445cc4d837fad3cd70e707b219871721f Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 21:09:32 -0500 Subject: [PATCH 19/23] get integ tests working --- .../elasticsearch/plugins/PluginManager.java | 2 -- .../main/resources/ant/integration-tests.xml | 33 +++++++++++++++++-- modules/pom.xml | 2 +- plugins/pom.xml | 17 +--------- qa/smoke-test-plugins/pom.xml | 16 --------- qa/vagrant/pom.xml | 12 ------- 6 files changed, 33 insertions(+), 49 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java index af95a762ab4f1..602db09220e4a 100644 --- a/core/src/main/java/org/elasticsearch/plugins/PluginManager.java +++ b/core/src/main/java/org/elasticsearch/plugins/PluginManager.java @@ -82,8 +82,6 @@ public enum OutputMode { "cloud-gce", "delete-by-query", "discovery-multicast", - "lang-expression", - "lang-groovy", "lang-javascript", "lang-python", "mapper-attachments", diff --git a/dev-tools/src/main/resources/ant/integration-tests.xml b/dev-tools/src/main/resources/ant/integration-tests.xml index e153b45e244b3..6885a7c7f5250 100644 --- a/dev-tools/src/main/resources/ant/integration-tests.xml +++ b/dev-tools/src/main/resources/ant/integration-tests.xml @@ -105,6 +105,29 @@ + + + + + + + + Installing module @{name}... + + + + + + + + + + + + + + + @@ -293,13 +316,19 @@ jvm.args="${tests.jvm.argline} -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000"/> - + + + + + + + - + diff --git a/modules/pom.xml b/modules/pom.xml index 66aa746faf1db..e04bd66dd54a4 100644 --- a/modules/pom.xml +++ b/modules/pom.xml @@ -309,7 +309,7 @@ ${skip.integ.tests} - + diff --git a/plugins/pom.xml b/plugins/pom.xml index 4608209694d92..a6410ed83c6d7 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -20,10 +20,9 @@ ../modules/pom.xml - - + org.apache.maven.plugins maven-antrun-plugin @@ -44,20 +43,6 @@ - - - integ-teardown - post-integration-test - - run - - - ${skip.integ.tests} - - - - - diff --git a/qa/smoke-test-plugins/pom.xml b/qa/smoke-test-plugins/pom.xml index fe19b1b2cd57b..ee67f210de7c2 100644 --- a/qa/smoke-test-plugins/pom.xml +++ b/qa/smoke-test-plugins/pom.xml @@ -309,22 +309,6 @@ true - - org.elasticsearch.plugin - lang-expression - ${elasticsearch.version} - zip - true - - - - org.elasticsearch.plugin - lang-groovy - ${elasticsearch.version} - zip - true - - org.elasticsearch.plugin lang-javascript diff --git a/qa/vagrant/pom.xml b/qa/vagrant/pom.xml index b656b9fa70b3a..804c901e43cd7 100644 --- a/qa/vagrant/pom.xml +++ b/qa/vagrant/pom.xml @@ -171,18 +171,6 @@ ${elasticsearch.version} zip - - org.elasticsearch.plugin - lang-expression - ${elasticsearch.version} - zip - - - org.elasticsearch.plugin - lang-groovy - ${elasticsearch.version} - zip - org.elasticsearch.plugin lang-javascript From be93ddc3653c1e60dcd7ddc74222fbee38cc75a8 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 21:11:43 -0500 Subject: [PATCH 20/23] remove gradle file --- modules/build.gradle | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 modules/build.gradle diff --git a/modules/build.gradle b/modules/build.gradle deleted file mode 100644 index a5da792854942..0000000000000 --- a/modules/build.gradle +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to Elasticsearch under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch 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. - */ - -subprojects { - apply plugin: 'elasticsearch.esplugin' - - esplugin { - // for local ES plugins, the name of the plugin is the same as the directory - name project.name - } -} From 4370157e9f60cbf75ba2c33d5567d158e5ddf020 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 21:59:58 -0500 Subject: [PATCH 21/23] fix packaging --- distribution/deb/pom.xml | 11 +++++++ distribution/integ-test-zip/pom.xml | 11 +++++++ distribution/pom.xml | 29 +++++++++++++++++++ distribution/rpm/pom.xml | 9 ++++++ .../src/main/assemblies/common-bin.xml | 4 +++ 5 files changed, 64 insertions(+) diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml index 846ab5d30861b..28c2778e97c6e 100644 --- a/distribution/deb/pom.xml +++ b/distribution/deb/pom.xml @@ -193,6 +193,17 @@ root + + + ${project.build.directory}/../target/modules + directory + + perm + ${packaging.elasticsearch.home.dir}/modules + root + root + + ${project.build.directory}/generated-packaging/deb/init.d/ diff --git a/distribution/integ-test-zip/pom.xml b/distribution/integ-test-zip/pom.xml index 5b60d92f98a32..e18e77e95f044 100644 --- a/distribution/integ-test-zip/pom.xml +++ b/distribution/integ-test-zip/pom.xml @@ -25,6 +25,17 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-modules + none + + + org.apache.maven.plugins maven-assembly-plugin diff --git a/distribution/pom.xml b/distribution/pom.xml index e9b51eb3f7c7c..a12013c161042 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -132,6 +132,35 @@ runtime + + + unpack-modules + prepare-package + + unpack + + + + + org.elasticsearch.module + lang-expression + ${elasticsearch.version} + zip + true + ${project.build.directory}/modules/lang-expression + + + org.elasticsearch.module + lang-groovy + ${elasticsearch.version} + zip + true + ${project.build.directory}/modules/lang-groovy + + + + diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml index 24b9c07c93086..f4e29600163d6 100644 --- a/distribution/rpm/pom.xml +++ b/distribution/rpm/pom.xml @@ -194,6 +194,15 @@ + + + ${packaging.elasticsearch.home.dir}/modules + + + target/modules/ + + + /etc/init.d diff --git a/distribution/src/main/assemblies/common-bin.xml b/distribution/src/main/assemblies/common-bin.xml index f95368d357279..e65e417341891 100644 --- a/distribution/src/main/assemblies/common-bin.xml +++ b/distribution/src/main/assemblies/common-bin.xml @@ -13,6 +13,10 @@ + + ${project.build.directory}/modules + modules + ../src/main/resources/config config From 2a7d6e0903e8fc5124a76d2ea07efa76f11d0bc8 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 22:28:39 -0500 Subject: [PATCH 22/23] make modules opt-in instead of opt-out, so parent pom has no dependency ever on them --- distribution/deb/pom.xml | 11 +++++++++++ distribution/integ-test-zip/pom.xml | 11 ----------- distribution/pom.xml | 5 ++--- distribution/rpm/pom.xml | 11 +++++++++++ distribution/tar/pom.xml | 11 +++++++++++ distribution/zip/pom.xml | 11 +++++++++++ 6 files changed, 46 insertions(+), 14 deletions(-) diff --git a/distribution/deb/pom.xml b/distribution/deb/pom.xml index 28c2778e97c6e..5c5320ae607cf 100644 --- a/distribution/deb/pom.xml +++ b/distribution/deb/pom.xml @@ -31,6 +31,17 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-modules + prepare-package + + + org.apache.maven.plugins maven-resources-plugin diff --git a/distribution/integ-test-zip/pom.xml b/distribution/integ-test-zip/pom.xml index e18e77e95f044..5b60d92f98a32 100644 --- a/distribution/integ-test-zip/pom.xml +++ b/distribution/integ-test-zip/pom.xml @@ -25,17 +25,6 @@ - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-modules - none - - - org.apache.maven.plugins maven-assembly-plugin diff --git a/distribution/pom.xml b/distribution/pom.xml index a12013c161042..7b5d67e7084fa 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -132,11 +132,10 @@ runtime - + unpack-modules - prepare-package + none unpack diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml index f4e29600163d6..9264c7d6b4b06 100644 --- a/distribution/rpm/pom.xml +++ b/distribution/rpm/pom.xml @@ -27,6 +27,17 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-modules + prepare-package + + + org.apache.maven.plugins diff --git a/distribution/tar/pom.xml b/distribution/tar/pom.xml index 7b5a465db9938..21ff11e99b088 100644 --- a/distribution/tar/pom.xml +++ b/distribution/tar/pom.xml @@ -25,6 +25,17 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-modules + prepare-package + + + org.apache.maven.plugins maven-assembly-plugin diff --git a/distribution/zip/pom.xml b/distribution/zip/pom.xml index b53c4fba4d4aa..b953ff3a5faeb 100644 --- a/distribution/zip/pom.xml +++ b/distribution/zip/pom.xml @@ -25,6 +25,17 @@ + + + org.apache.maven.plugins + maven-dependency-plugin + + + unpack-modules + prepare-package + + + org.apache.maven.plugins maven-assembly-plugin From 1ba7b4fe15de8c95e36a8d2238c0484f9a0083a1 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Mon, 7 Dec 2015 23:41:59 -0500 Subject: [PATCH 23/23] get mvn verify passing --- distribution/integ-test-zip/pom.xml | 6 + .../licenses/antlr4-runtime-4.5.1-1.jar.sha1 | 1 + .../licenses/antlr4-runtime-LICENSE.txt | 26 +++ .../licenses/antlr4-runtime-NOTICE.txt | 0 distribution/licenses/asm-5.0.4.jar.sha1 | 1 + distribution/licenses/asm-LICENSE.txt | 26 +++ distribution/licenses/asm-NOTICE.txt | 1 + .../licenses/asm-commons-5.0.4.jar.sha1 | 1 + distribution/licenses/asm-commons-LICENSE.txt | 26 +++ distribution/licenses/asm-commons-NOTICE.txt | 1 + .../licenses/groovy-all-2.4.4-indy.jar.sha1 | 1 + .../licenses/groovy-all-LICENSE-ANTLR.txt | 31 +++ .../licenses/groovy-all-LICENSE-ASM.txt | 31 +++ .../licenses/groovy-all-LICENSE-CLI.txt | 202 ++++++++++++++++++ .../licenses/groovy-all-LICENSE-JSR223.txt | 30 +++ distribution/licenses/groovy-all-LICENSE.txt | 15 ++ distribution/licenses/groovy-all-NOTICE.txt | 5 + ...xpressions-5.4.0-snapshot-1715952.jar.sha1 | 1 + distribution/pom.xml | 9 + distribution/rpm/pom.xml | 16 +- pom.xml | 3 +- 21 files changed, 421 insertions(+), 12 deletions(-) create mode 100644 distribution/licenses/antlr4-runtime-4.5.1-1.jar.sha1 create mode 100644 distribution/licenses/antlr4-runtime-LICENSE.txt create mode 100644 distribution/licenses/antlr4-runtime-NOTICE.txt create mode 100644 distribution/licenses/asm-5.0.4.jar.sha1 create mode 100644 distribution/licenses/asm-LICENSE.txt create mode 100644 distribution/licenses/asm-NOTICE.txt create mode 100644 distribution/licenses/asm-commons-5.0.4.jar.sha1 create mode 100644 distribution/licenses/asm-commons-LICENSE.txt create mode 100644 distribution/licenses/asm-commons-NOTICE.txt create mode 100644 distribution/licenses/groovy-all-2.4.4-indy.jar.sha1 create mode 100644 distribution/licenses/groovy-all-LICENSE-ANTLR.txt create mode 100644 distribution/licenses/groovy-all-LICENSE-ASM.txt create mode 100644 distribution/licenses/groovy-all-LICENSE-CLI.txt create mode 100644 distribution/licenses/groovy-all-LICENSE-JSR223.txt create mode 100644 distribution/licenses/groovy-all-LICENSE.txt create mode 100644 distribution/licenses/groovy-all-NOTICE.txt create mode 100644 distribution/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 diff --git a/distribution/integ-test-zip/pom.xml b/distribution/integ-test-zip/pom.xml index 5b60d92f98a32..b88ee055c87e2 100644 --- a/distribution/integ-test-zip/pom.xml +++ b/distribution/integ-test-zip/pom.xml @@ -96,6 +96,12 @@ + + + + check-license + none + diff --git a/distribution/licenses/antlr4-runtime-4.5.1-1.jar.sha1 b/distribution/licenses/antlr4-runtime-4.5.1-1.jar.sha1 new file mode 100644 index 0000000000000..f15e50069ba63 --- /dev/null +++ b/distribution/licenses/antlr4-runtime-4.5.1-1.jar.sha1 @@ -0,0 +1 @@ +66144204f9d6d7d3f3f775622c2dd7e9bd511d97 diff --git a/distribution/licenses/antlr4-runtime-LICENSE.txt b/distribution/licenses/antlr4-runtime-LICENSE.txt new file mode 100644 index 0000000000000..95d0a2554f686 --- /dev/null +++ b/distribution/licenses/antlr4-runtime-LICENSE.txt @@ -0,0 +1,26 @@ +[The "BSD license"] +Copyright (c) 2015 Terence Parr, Sam Harwell +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/distribution/licenses/antlr4-runtime-NOTICE.txt b/distribution/licenses/antlr4-runtime-NOTICE.txt new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/distribution/licenses/asm-5.0.4.jar.sha1 b/distribution/licenses/asm-5.0.4.jar.sha1 new file mode 100644 index 0000000000000..9223dba380f8c --- /dev/null +++ b/distribution/licenses/asm-5.0.4.jar.sha1 @@ -0,0 +1 @@ +0da08b8cce7bbf903602a25a3a163ae252435795 diff --git a/distribution/licenses/asm-LICENSE.txt b/distribution/licenses/asm-LICENSE.txt new file mode 100644 index 0000000000000..afb064f2f2666 --- /dev/null +++ b/distribution/licenses/asm-LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2012 France Télécom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. diff --git a/distribution/licenses/asm-NOTICE.txt b/distribution/licenses/asm-NOTICE.txt new file mode 100644 index 0000000000000..8d1c8b69c3fce --- /dev/null +++ b/distribution/licenses/asm-NOTICE.txt @@ -0,0 +1 @@ + diff --git a/distribution/licenses/asm-commons-5.0.4.jar.sha1 b/distribution/licenses/asm-commons-5.0.4.jar.sha1 new file mode 100644 index 0000000000000..94fe0cd92c9c9 --- /dev/null +++ b/distribution/licenses/asm-commons-5.0.4.jar.sha1 @@ -0,0 +1 @@ +5a556786086c23cd689a0328f8519db93821c04c diff --git a/distribution/licenses/asm-commons-LICENSE.txt b/distribution/licenses/asm-commons-LICENSE.txt new file mode 100644 index 0000000000000..afb064f2f2666 --- /dev/null +++ b/distribution/licenses/asm-commons-LICENSE.txt @@ -0,0 +1,26 @@ +Copyright (c) 2012 France Télécom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. diff --git a/distribution/licenses/asm-commons-NOTICE.txt b/distribution/licenses/asm-commons-NOTICE.txt new file mode 100644 index 0000000000000..8d1c8b69c3fce --- /dev/null +++ b/distribution/licenses/asm-commons-NOTICE.txt @@ -0,0 +1 @@ + diff --git a/distribution/licenses/groovy-all-2.4.4-indy.jar.sha1 b/distribution/licenses/groovy-all-2.4.4-indy.jar.sha1 new file mode 100644 index 0000000000000..458716cefdf6e --- /dev/null +++ b/distribution/licenses/groovy-all-2.4.4-indy.jar.sha1 @@ -0,0 +1 @@ +574a15e35eba5f986a0564ae197c78e843ece954 diff --git a/distribution/licenses/groovy-all-LICENSE-ANTLR.txt b/distribution/licenses/groovy-all-LICENSE-ANTLR.txt new file mode 100644 index 0000000000000..d62cc1ab2d771 --- /dev/null +++ b/distribution/licenses/groovy-all-LICENSE-ANTLR.txt @@ -0,0 +1,31 @@ + +SOFTWARE RIGHTS + +ANTLR 1989-2006 Developed by Terence Parr +Partially supported by University of San Francisco & jGuru.com + +We reserve no legal rights to the ANTLR--it is fully in the +public domain. An individual or company may do whatever +they wish with source code distributed with ANTLR or the +code generated by ANTLR, including the incorporation of +ANTLR, or its output, into commerical software. + +We encourage users to develop software with ANTLR. However, +we do ask that credit is given to us for developing +ANTLR. By "credit", we mean that if you use ANTLR or +incorporate any source code into one of your programs +(commercial product, research project, or otherwise) that +you acknowledge this fact somewhere in the documentation, +research report, etc... If you like ANTLR and have +developed a nice tool with the output, please mention that +you developed it using ANTLR. In addition, we ask that the +headers remain intact in our source code. As long as these +guidelines are kept, we expect to continue enhancing this +system and expect to make other tools available as they are +completed. + +The primary ANTLR guy: + +Terence Parr +parrt@cs.usfca.edu +parrt@antlr.org diff --git a/distribution/licenses/groovy-all-LICENSE-ASM.txt b/distribution/licenses/groovy-all-LICENSE-ASM.txt new file mode 100644 index 0000000000000..ae898f7554547 --- /dev/null +++ b/distribution/licenses/groovy-all-LICENSE-ASM.txt @@ -0,0 +1,31 @@ +/*** + * http://asm.objectweb.org/ + * + * ASM: a very small and fast Java bytecode manipulation framework + * Copyright (c) 2000-2005 INRIA, France Telecom + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holders nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/distribution/licenses/groovy-all-LICENSE-CLI.txt b/distribution/licenses/groovy-all-LICENSE-CLI.txt new file mode 100644 index 0000000000000..57bc88a15a0ee --- /dev/null +++ b/distribution/licenses/groovy-all-LICENSE-CLI.txt @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. + diff --git a/distribution/licenses/groovy-all-LICENSE-JSR223.txt b/distribution/licenses/groovy-all-LICENSE-JSR223.txt new file mode 100644 index 0000000000000..b750c0f5f7b5b --- /dev/null +++ b/distribution/licenses/groovy-all-LICENSE-JSR223.txt @@ -0,0 +1,30 @@ +The following notice applies to the files: + +src/main/org/codehaus/groovy/jsr223/GroovyCompiledScript.java +src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineFactory.java +src/main/org/codehaus/groovy/jsr223/GroovyScriptEngineImpl.java + + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: Redistributions of source code + * must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of + * conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. Neither the name of the Sun Microsystems nor the names of + * is contributors may be used to endorse or promote products derived from this software + * without specific prior written permission. + + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ diff --git a/distribution/licenses/groovy-all-LICENSE.txt b/distribution/licenses/groovy-all-LICENSE.txt new file mode 100644 index 0000000000000..e0908d496f62f --- /dev/null +++ b/distribution/licenses/groovy-all-LICENSE.txt @@ -0,0 +1,15 @@ +/* + * Licensed 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. + * + */ + \ No newline at end of file diff --git a/distribution/licenses/groovy-all-NOTICE.txt b/distribution/licenses/groovy-all-NOTICE.txt new file mode 100644 index 0000000000000..72eb32a902458 --- /dev/null +++ b/distribution/licenses/groovy-all-NOTICE.txt @@ -0,0 +1,5 @@ +Apache Commons CLI +Copyright 2001-2009 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). diff --git a/distribution/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 b/distribution/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 new file mode 100644 index 0000000000000..d81842d03ad7b --- /dev/null +++ b/distribution/licenses/lucene-expressions-5.4.0-snapshot-1715952.jar.sha1 @@ -0,0 +1 @@ +414dfcf600b6c02b90a21bd219a5e115bbda0d14 \ No newline at end of file diff --git a/distribution/pom.xml b/distribution/pom.xml index 7b5d67e7084fa..9183649837b0f 100644 --- a/distribution/pom.xml +++ b/distribution/pom.xml @@ -15,6 +15,13 @@ Distribution: Parent POM + + + + lang-groovy|lang-expression + /usr/share/elasticsearch /usr/share/elasticsearch/bin @@ -32,6 +39,8 @@ ${project.basedir}/../licenses ${integ.scratch} + + (${project.build.finalName}|${packaging.module.list}) true diff --git a/distribution/rpm/pom.xml b/distribution/rpm/pom.xml index 9264c7d6b4b06..a40f724cb6656 100644 --- a/distribution/rpm/pom.xml +++ b/distribution/rpm/pom.xml @@ -27,17 +27,6 @@ - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-modules - prepare-package - - - org.apache.maven.plugins @@ -332,6 +321,11 @@ org.apache.maven.plugins maven-dependency-plugin + + + unpack-modules + prepare-package + copy-rpm package diff --git a/pom.xml b/pom.xml index 4c5da26edf8c1..5fe682ccb23c0 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,7 @@ ${project.basedir}/licenses ${basedir}/target/releases/${project.build.finalName}.zip + ${project.build.finalName} auto @@ -1242,7 +1243,7 @@ org.eclipse.jdt.ui.text.custom_code_templates= - +