From 6d4d599f91f715ef4dd1dbc29bb41a0ae9df9b43 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 14 Dec 2016 15:02:28 -0800 Subject: [PATCH] Build: Convert xplugins to use new extra projects setup (elastic/elasticsearch#4175) * Build: Convert xplugins to use new extra projects setup This change makes the gradle initialization for xplugins look in the correct location for elasticsearch, which is now as a sibling of an elasticsearch-extra directory, with x-plugins as a child of the extra directory. The elasticsearch side of this change is elastic/elasticsearchelastic/elasticsearch#21773. This change will enable renaming x-plugins to x-pack, see elastic/elasticsearch#3643. Original commit: elastic/x-pack-elasticsearch@09398aea5a0881cc73d1085afa172549b3bb0ac6 --- build.gradle | 4 ++-- buildSrc/settings.gradle | 8 ++++++-- dev-tools/ci | 6 +++--- elasticsearch/build.gradle | 2 +- license-tools/build.gradle | 2 +- qa/audit-tests/build.gradle | 8 ++++---- qa/core-rest-tests-with-security/build.gradle | 4 ++-- qa/reindex-tests-with-security/build.gradle | 6 +++--- qa/rolling-upgrade/build.gradle | 12 ++++++------ qa/security-client-tests/build.gradle | 10 +++++----- qa/security-example-realm/build.gradle | 10 +++++----- qa/security-migrate-tests/build.gradle | 6 +++--- qa/smoke-test-graph-with-security/build.gradle | 6 +++--- qa/smoke-test-monitoring-with-security/build.gradle | 6 +++--- qa/smoke-test-plugins-ssl/build.gradle | 8 ++++---- qa/smoke-test-plugins/build.gradle | 4 ++-- qa/smoke-test-security-with-mustache/build.gradle | 4 ++-- qa/smoke-test-watcher-with-mustache/build.gradle | 4 ++-- qa/smoke-test-watcher-with-painless/build.gradle | 4 ++-- qa/smoke-test-watcher-with-security/build.gradle | 6 +++--- qa/smoke-test-watcher/build.gradle | 4 ++-- qa/tribe-tests-with-license/build.gradle | 10 +++++----- qa/vagrant/build.gradle | 2 +- settings.gradle | 9 +++++++-- 24 files changed, 77 insertions(+), 68 deletions(-) diff --git a/build.gradle b/build.gradle index 6897ddfc95a..d9afb6b027f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.precommit.LicenseHeadersTask -if (project.projectDir.name != 'x-plugins') { +if (project.projectDir.name != 'x-pack') { throw new GradleException('You must checkout x-plugins in a directory named x-plugins next to elasticsearch') } @@ -71,5 +71,5 @@ subprojects { approvedLicenses = ['Elasticsearch Confidential'] additionalLicense 'ESCON', 'Elasticsearch Confidential', 'ELASTICSEARCH CONFIDENTIAL' } - ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-plugins:elasticsearch' ] + ext.projectSubstitutions += [ "org.elasticsearch.plugin:x-pack-api:${version}": ':x-pack:elasticsearch' ] } diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle index fede2f180e7..2a93621e118 100644 --- a/buildSrc/settings.gradle +++ b/buildSrc/settings.gradle @@ -1,6 +1,10 @@ -File elasticsearchDir = new File(settingsDir, '../../elasticsearch') +File extrasDir = new File(settingsDir, '../..').getCanonicalFile() +if (extrasDir.name.endsWith('-extra') == false) { + throw new GradleException("x-pack must be checked out under an elasticsearch-extra directory, found ${extrasDir.name}") +} +File elasticsearchDir = new File(extrasDir.parentFile, extrasDir.name[0..-7]) if (elasticsearchDir.exists() == false) { - throw new GradleException('Elasticsearch must be checked out as a sibling directory of x-plugins') + throw new GradleException("${elasticsearchDir.name} is missing as a sibling to ${extrasDir.name}") } project(':').projectDir = new File(elasticsearchDir, 'buildSrc') diff --git a/dev-tools/ci b/dev-tools/ci index 7980fc4986e..2471aa67c46 100755 --- a/dev-tools/ci +++ b/dev-tools/ci @@ -1,5 +1,5 @@ #!/bin/bash -# This script is used as a single command to run the x-plugins tests. +# This script is used as a single command to run the x-pack tests. # # It will attempt to check out 'elasticsearch' into a sibling directory # unless the environment variable `USE_EXISTING_ES` has a value. The @@ -26,7 +26,7 @@ set -o pipefail key=${1-check} case $key in packagingTest) - GRADLE_OPT_STRING="--info -Pvagrant.boxes=all :x-plugins:qa:vagrant:packagingTest" + GRADLE_OPT_STRING="--info -Pvagrant.boxes=all :x-pack:qa:vagrant:packagingTest" ;; check) GRADLE_OPT_STRING="--info check -Dtests.network=true -Dtests.badapples=true" @@ -56,7 +56,7 @@ BASE_DIR=$(dirname "$SCRIPT")/.. # make BASE_DIR absolute BASE_DIR=$(cd "$BASE_DIR"; pwd) -PARENT_DIR=$(cd "$BASE_DIR"/..; pwd) +PARENT_DIR=$(cd "$BASE_DIR"/../..; pwd) # go to the parent directory cd $PARENT_DIR diff --git a/elasticsearch/build.gradle b/elasticsearch/build.gradle index c529ae1a3db..ae0f33260ab 100644 --- a/elasticsearch/build.gradle +++ b/elasticsearch/build.gradle @@ -91,7 +91,7 @@ forbiddenPatterns { // TODO: standardize packaging config for plugins bundlePlugin { - from(project(':x-plugins').projectDir) { + from(project(':x-pack').projectDir) { include 'LICENSE.txt' } from(projectDir) { diff --git a/license-tools/build.gradle b/license-tools/build.gradle index 13db2144c5e..5dce489ae88 100644 --- a/license-tools/build.gradle +++ b/license-tools/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'elasticsearch.build' dependencies { - compile project(':x-plugins:elasticsearch') + compile project(':x-pack:elasticsearch') compile "org.elasticsearch:elasticsearch:${version}" testCompile "org.elasticsearch.test:framework:${version}" } diff --git a/qa/audit-tests/build.gradle b/qa/audit-tests/build.gradle index 2ced7481f2f..e0d5a6252fa 100644 --- a/qa/audit-tests/build.gradle +++ b/qa/audit-tests/build.gradle @@ -1,20 +1,20 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } String outputDir = "generated-resources/${project.name}" task copyXPackPluginProps(type: Copy) { - from project(':x-plugins:elasticsearch').file('src/main/plugin-metadata') - from project(':x-plugins:elasticsearch').tasks.pluginProperties + from project(':x-pack:elasticsearch').file('src/main/plugin-metadata') + from project(':x-pack:elasticsearch').tasks.pluginProperties into outputDir } project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.security.audit.enabled', 'true' setting 'xpack.security.audit.outputs', 'index' setting 'logger.level', 'DEBUG' diff --git a/qa/core-rest-tests-with-security/build.gradle b/qa/core-rest-tests-with-security/build.gradle index ad91d63220f..a3e54ecf7ce 100644 --- a/qa/core-rest-tests-with-security/build.gradle +++ b/qa/core-rest-tests-with-security/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } integTest { @@ -16,7 +16,7 @@ integTest { ].join(',') cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setupCommand 'setupDummyUser', diff --git a/qa/reindex-tests-with-security/build.gradle b/qa/reindex-tests-with-security/build.gradle index 983f6199afe..1a16201626a 100644 --- a/qa/reindex-tests-with-security/build.gradle +++ b/qa/reindex-tests-with-security/build.gradle @@ -1,15 +1,15 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'testArtifacts') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'testArtifacts') testCompile project(path: ':modules:reindex') } integTest { cluster { setting 'script.inline', 'true' - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' // Whitelist reindexing from the local node so we can test it. setting 'reindex.remote.whitelist', '127.0.0.1:*' extraConfigFile 'x-pack/roles.yml', 'roles.yml' diff --git a/qa/rolling-upgrade/build.gradle b/qa/rolling-upgrade/build.gradle index 5a014e08c6f..b153a5e0f56 100644 --- a/qa/rolling-upgrade/build.gradle +++ b/qa/rolling-upgrade/build.gradle @@ -50,7 +50,7 @@ Closure waitWithAuth = { NodeInfo node, AntBuilder ant -> task oldClusterTest(type: RestIntegTestTask) { mustRunAfter(precommit) cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' distribution = 'zip' bwcVersion = '6.0.0-alpha1-SNAPSHOT' // TODO: either randomize, or make this settable with sysprop numBwcNodes = 2 @@ -65,7 +65,7 @@ task oldClusterTest(type: RestIntegTestTask) { task mixedClusterTest(type: RestIntegTestTask) { dependsOn(oldClusterTest, 'oldClusterTest#node1.stop') cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' distribution = 'zip' clusterName = 'rolling-upgrade' unicastTransportUri = { seedNode, node, ant -> oldClusterTest.nodes.get(0).transportUri() } @@ -79,7 +79,7 @@ task mixedClusterTest(type: RestIntegTestTask) { task upgradedClusterTest(type: RestIntegTestTask) { dependsOn(mixedClusterTest, 'oldClusterTest#node0.stop') cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' distribution = 'zip' clusterName = 'rolling-upgrade' unicastTransportUri = { seedNode, node, ant -> mixedClusterTest.nodes.get(0).transportUri() } @@ -100,14 +100,14 @@ test.enabled = false // no unit tests for rolling upgrades, only the rest integr check.dependsOn(integTest) dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } // copy x-pack plugin info so it is on the classpath and security manager has the right permissions String outputDir = "generated-resources/${project.name}" task copyXPackPluginProps(type: Copy) { - from project(':x-plugins:elasticsearch').file('src/main/plugin-metadata') - from project(':x-plugins:elasticsearch').tasks.pluginProperties + from project(':x-pack:elasticsearch').file('src/main/plugin-metadata') + from project(':x-pack:elasticsearch').tasks.pluginProperties into outputDir } project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) diff --git a/qa/security-client-tests/build.gradle b/qa/security-client-tests/build.gradle index c9e7b4ccc28..a8acb65e7cd 100644 --- a/qa/security-client-tests/build.gradle +++ b/qa/security-client-tests/build.gradle @@ -1,21 +1,21 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') - testCompile project(path: ':x-plugins:elasticsearch-transport-client', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch-transport-client', configuration: 'runtime') } String outputDir = "generated-resources/${project.name}" task copyXPackPluginProps(type: Copy) { - from project(':x-plugins:elasticsearch').file('src/main/plugin-metadata') - from project(':x-plugins:elasticsearch').tasks.pluginProperties + from project(':x-pack:elasticsearch').file('src/main/plugin-metadata') + from project(':x-pack:elasticsearch').tasks.pluginProperties into outputDir } project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setupCommand 'setupDummyUser', 'bin/x-pack/users', 'useradd', 'test_user', '-p', 'changeme', '-r', 'superuser' setupCommand 'setupTransportClientUser', diff --git a/qa/security-example-realm/build.gradle b/qa/security-example-realm/build.gradle index 94e8a663580..d131c9548ed 100644 --- a/qa/security-example-realm/build.gradle +++ b/qa/security-example-realm/build.gradle @@ -5,10 +5,10 @@ apply plugin: 'elasticsearch.build' dependencies { provided "org.elasticsearch:elasticsearch:${versions.elasticsearch}" - provided project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + provided project(path: ':x-pack:elasticsearch', configuration: 'runtime') testCompile "org.elasticsearch.test:framework:${project.versions.elasticsearch}" - testCompile project(path: ':x-plugins:elasticsearch-transport-client', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch-transport-client', configuration: 'runtime') } Map generateSubstitutions() { @@ -27,8 +27,8 @@ Map generateSubstitutions() { String outputDir = "generated-resources/${project.name}" task copyXPackPluginProps(type: Copy) { - from project(':x-plugins:elasticsearch').file('src/main/plugin-metadata') - from project(':x-plugins:elasticsearch').tasks.pluginProperties + from project(':x-pack:elasticsearch').file('src/main/plugin-metadata') + from project(':x-pack:elasticsearch').tasks.pluginProperties into outputDir } project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) @@ -45,7 +45,7 @@ task buildZip(type:Zip, dependsOn: [jar]) { task integTest(type: org.elasticsearch.gradle.test.RestIntegTestTask, dependsOn: buildZip) { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.security.authc.realms.custom.order', '0' setting 'xpack.security.authc.realms.custom.type', 'custom' setting 'xpack.security.authc.realms.custom.filtered_setting', 'should be filtered' diff --git a/qa/security-migrate-tests/build.gradle b/qa/security-migrate-tests/build.gradle index 069b2a72eed..20e6f3b72d0 100644 --- a/qa/security-migrate-tests/build.gradle +++ b/qa/security-migrate-tests/build.gradle @@ -1,14 +1,14 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') - testCompile project(path: ':x-plugins:elasticsearch-transport-client', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch-transport-client', configuration: 'runtime') } integTest { cluster { setting 'script.inline', 'true' - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' extraConfigFile 'x-pack/roles.yml', 'roles.yml' [ test_admin: 'superuser', diff --git a/qa/smoke-test-graph-with-security/build.gradle b/qa/smoke-test-graph-with-security/build.gradle index d0191938a8a..2e89a95aebe 100644 --- a/qa/smoke-test-graph-with-security/build.gradle +++ b/qa/smoke-test-graph-with-security/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } // bring in graph rest test suite task copyGraphRestTests(type: Copy) { into project.sourceSets.test.output.resourcesDir - from project(':x-plugins:elasticsearch').sourceSets.test.resources.srcDirs + from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs include 'rest-api-spec/test/graph/**' } @@ -15,7 +15,7 @@ integTest { dependsOn copyGraphRestTests cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' extraConfigFile 'x-pack/roles.yml', 'roles.yml' setupCommand 'setupTestAdminUser', 'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser' diff --git a/qa/smoke-test-monitoring-with-security/build.gradle b/qa/smoke-test-monitoring-with-security/build.gradle index a3a5cbdc738..383d99dff2d 100644 --- a/qa/smoke-test-monitoring-with-security/build.gradle +++ b/qa/smoke-test-monitoring-with-security/build.gradle @@ -2,13 +2,13 @@ subprojects { apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } // bring in monitoring rest test suite task copyMonitoringRestTests(type: Copy) { into project.sourceSets.test.output.resourcesDir - from project(':x-plugins:elasticsearch').sourceSets.test.resources.srcDirs + from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs include 'rest-api-spec/test/monitoring/**' } @@ -17,7 +17,7 @@ subprojects { cluster { systemProperty 'es.logger.level', 'TRACE' - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.monitoring.collection.interval', '3s' extraConfigFile 'x-pack/roles.yml', '../roles.yml' setupCommand 'setupTestAdminUser', diff --git a/qa/smoke-test-plugins-ssl/build.gradle b/qa/smoke-test-plugins-ssl/build.gradle index e8f16ff5fed..73d4af8b98c 100644 --- a/qa/smoke-test-plugins-ssl/build.gradle +++ b/qa/smoke-test-plugins-ssl/build.gradle @@ -13,13 +13,13 @@ import java.security.SecureRandom apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } String outputDir = "generated-resources/${project.name}" task copyXPackPluginProps(type: Copy) { - from project(':x-plugins:elasticsearch').file('src/main/plugin-metadata') - from project(':x-plugins:elasticsearch').tasks.pluginProperties + from project(':x-pack:elasticsearch').file('src/main/plugin-metadata') + from project(':x-pack:elasticsearch').tasks.pluginProperties into outputDir } project.sourceSets.test.output.dir(outputDir, builtBy: copyXPackPluginProps) @@ -175,7 +175,7 @@ integTest { setting 'xpack.ssl.keystore.path', nodeKeystore.name setting 'xpack.ssl.keystore.password', 'keypass' - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' // copy keystores into config/ extraConfigFile nodeKeystore.name, nodeKeystore diff --git a/qa/smoke-test-plugins/build.gradle b/qa/smoke-test-plugins/build.gradle index dc60be5ef5b..b1531324ad2 100644 --- a/qa/smoke-test-plugins/build.gradle +++ b/qa/smoke-test-plugins/build.gradle @@ -3,7 +3,7 @@ import org.elasticsearch.gradle.MavenFilteringHack apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } ext.pluginsCount = 1 // we install xpack explicitly @@ -15,7 +15,7 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setupCommand 'setupDummyUser', 'bin/x-pack/users', 'useradd', 'test_user', '-p', 'changeme', '-r', 'superuser' diff --git a/qa/smoke-test-security-with-mustache/build.gradle b/qa/smoke-test-security-with-mustache/build.gradle index 64839ad2b84..908d2778496 100644 --- a/qa/smoke-test-security-with-mustache/build.gradle +++ b/qa/smoke-test-security-with-mustache/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') testCompile project(path: ':modules:lang-mustache', configuration: 'runtime') } integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.watcher.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'path.scripts', "${project.buildDir}/resources/test/templates" diff --git a/qa/smoke-test-watcher-with-mustache/build.gradle b/qa/smoke-test-watcher-with-mustache/build.gradle index 8056b52f170..9fbaa5da129 100644 --- a/qa/smoke-test-watcher-with-mustache/build.gradle +++ b/qa/smoke-test-watcher-with-mustache/build.gradle @@ -1,7 +1,7 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') testCompile project(path: ':modules:lang-mustache', configuration: 'runtime') } @@ -11,7 +11,7 @@ integTest { systemProperty 'tests.rest.blacklist', 'actions/20_jira/*' cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'http.port', '9400' diff --git a/qa/smoke-test-watcher-with-painless/build.gradle b/qa/smoke-test-watcher-with-painless/build.gradle index 54a44ffded7..887017f7f80 100644 --- a/qa/smoke-test-watcher-with-painless/build.gradle +++ b/qa/smoke-test-watcher-with-painless/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') testCompile project(path: ':modules:lang-painless', configuration: 'runtime') } integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'script.inline', 'true' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' diff --git a/qa/smoke-test-watcher-with-security/build.gradle b/qa/smoke-test-watcher-with-security/build.gradle index 580106015d9..44b738867d2 100644 --- a/qa/smoke-test-watcher-with-security/build.gradle +++ b/qa/smoke-test-watcher-with-security/build.gradle @@ -1,13 +1,13 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } // bring in watcher rest test suite task copyWatcherRestTests(type: Copy) { into project.sourceSets.test.output.resourcesDir - from project(':x-plugins:elasticsearch').sourceSets.test.resources.srcDirs + from project(':x-pack:elasticsearch').sourceSets.test.resources.srcDirs include 'rest-api-spec/test/watcher/**' } @@ -18,7 +18,7 @@ integTest { 'getting_started/10_monitor_cluster_health/Getting started - Monitor cluster health'].join(',') cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' extraConfigFile 'x-pack/roles.yml', 'roles.yml' setupCommand 'setupTestAdminUser', 'bin/x-pack/users', 'useradd', 'test_admin', '-p', 'changeme', '-r', 'superuser' diff --git a/qa/smoke-test-watcher/build.gradle b/qa/smoke-test-watcher/build.gradle index 67295511e7e..524b066f72f 100644 --- a/qa/smoke-test-watcher/build.gradle +++ b/qa/smoke-test-watcher/build.gradle @@ -1,12 +1,12 @@ apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') } integTest { cluster { - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.security.enabled', 'false' setting 'xpack.monitoring.enabled', 'false' setting 'http.port', '9400' diff --git a/qa/tribe-tests-with-license/build.gradle b/qa/tribe-tests-with-license/build.gradle index 98906ad459c..e1c680a2f66 100644 --- a/qa/tribe-tests-with-license/build.gradle +++ b/qa/tribe-tests-with-license/build.gradle @@ -5,8 +5,8 @@ import org.elasticsearch.gradle.test.NodeInfo apply plugin: 'elasticsearch.rest-test' dependencies { - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'runtime') - testCompile project(path: ':x-plugins:elasticsearch', configuration: 'testArtifacts') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'runtime') + testCompile project(path: ':x-pack:elasticsearch', configuration: 'testArtifacts') } List cluster1Nodes @@ -17,7 +17,7 @@ task setupClusterOne(type: DefaultTask) { cluster1Config.clusterName = 'cluster1' cluster1Config.setting('node.name', 'cluster1-node1') // x-pack - cluster1Config.plugin(':x-plugins:elasticsearch') + cluster1Config.plugin(':x-pack:elasticsearch') cluster1Config.setting('xpack.monitoring.enabled', false) cluster1Config.setting('xpack.security.enabled', false) cluster1Config.setting('xpack.watcher.enabled', false) @@ -34,7 +34,7 @@ task setupClusterTwo(type: DefaultTask) { cluster2Config.clusterName = 'cluster2' cluster2Config.setting('node.name', 'cluster2-node1') // x-pack - cluster2Config.plugin(':x-plugins:elasticsearch') + cluster2Config.plugin(':x-pack:elasticsearch') cluster2Config.setting('xpack.monitoring.enabled', false) cluster2Config.setting('xpack.monitoring.enabled', false) cluster2Config.setting('xpack.security.enabled', false) @@ -66,7 +66,7 @@ integTest { setting 'tribe.cluster2.xpack.watcher.enabled', false setting 'tribe.cluster2.xpack.graph.enabled', false // x-pack - plugin ':x-plugins:elasticsearch' + plugin ':x-pack:elasticsearch' setting 'xpack.monitoring.enabled', false setting 'xpack.monitoring.enabled', false setting 'xpack.security.enabled', false diff --git a/qa/vagrant/build.gradle b/qa/vagrant/build.gradle index 9153643d298..e5b6e62a6ff 100644 --- a/qa/vagrant/build.gradle +++ b/qa/vagrant/build.gradle @@ -5,7 +5,7 @@ esvagrant { } dependencies { - bats project(path: ':x-plugins:elasticsearch', configuration: 'zip') + bats project(path: ':x-pack:elasticsearch', configuration: 'zip') // Inherit Bats test utils from :qa:vagrant project bats project(path: ':qa:vagrant', configuration: 'bats') diff --git a/settings.gradle b/settings.gradle index 651d9aca508..ef7a11ca65c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,2 +1,7 @@ -project(':').projectDir = new File('../elasticsearch') -apply from: '../elasticsearch/settings.gradle' +File extrasDir = new File(settingsDir, '..').getCanonicalFile() +if (extrasDir.name.endsWith('-extra') == false) { + throw new GradleException("x-pack must be checked out under an elasticsearch-extra directory, found ${extrasDir.name}") +} +File elasticsearchDir = new File(extrasDir.parentFile, extrasDir.name[0..-7]) +project(':').projectDir = elasticsearchDir +apply from: "${elasticsearchDir}/settings.gradle"