diff --git a/dev-tools/ci b/dev-tools/ci index 1c23a66d576..35b54022923 100755 --- a/dev-tools/ci +++ b/dev-tools/ci @@ -60,12 +60,9 @@ case $key in smokeTestSql) # TODO remove this once we are ready to merge sql down GRADLE_CLI_ARGS=( "--info" - "-psql" + "-ppluin/sql" "check" ":x-pack-elasticsearch:plugin:precommit" - ":x-pack-elasticsearch:plugin:sql:check" - ":x-pack-elasticsearch:plugin:sql:sql-cli:check" - ":x-pack-elasticsearch:plugin:sql:jdbc:check" ":x-pack-elasticsearch:qa:sql:check" ":x-pack-elasticsearch:qa:sql:multinode:check" ":x-pack-elasticsearch:qa:sql:no-security:check" diff --git a/plugin/build.gradle b/plugin/build.gradle index 114740d9919..dabf98738a3 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -32,7 +32,7 @@ dependencyLicenses { mapping from: /transport-netty.*/, to: 'elasticsearch' mapping from: /elasticsearch-rest-client.*/, to: 'elasticsearch' mapping from: /server.*/, to: 'elasticsearch' - mapping from: /rest-proto.*/, to: 'elasticsearch' + mapping from: /sql-proto.*/, to: 'elasticsearch' mapping from: /x-pack-sql.*/, to: 'elasticsearch' mapping from: /http.*/, to: 'httpclient' // pulled in by rest client mapping from: /commons-.*/, to: 'commons' // pulled in by rest client @@ -40,7 +40,7 @@ dependencyLicenses { ignoreSha 'transport-netty4' ignoreSha 'tribe' ignoreSha 'server' - ignoreSha 'rest-proto' + ignoreSha 'sql-proto' ignoreSha 'elasticsearch-rest-client-sniffer' ignoreSha 'x-pack-core' ignoreSha 'x-pack-sql' diff --git a/plugin/sql/build.gradle b/plugin/sql/build.gradle index c8a05b6d448..b51a9955a82 100644 --- a/plugin/sql/build.gradle +++ b/plugin/sql/build.gradle @@ -6,7 +6,7 @@ archivesBaseName = 'x-pack-sql' dependencies { provided "org.elasticsearch:elasticsearch:${version}" - compile project(':x-pack-elasticsearch:sql:rest-proto') + compile project(':x-pack-elasticsearch:plugin:sql:sql-proto') compile "org.elasticsearch.plugin:x-pack-core:${version}" compile 'org.antlr:antlr4-runtime:4.5.3' testCompile "org.elasticsearch.test:framework:${version}" @@ -14,11 +14,11 @@ dependencies { dependencyLicenses { mapping from: /server.*/, to: 'elasticsearch' - mapping from: /rest-proto.*/, to: 'elasticsearch' + mapping from: /sql-proto.*/, to: 'elasticsearch' mapping from: /x-pack-core.*/, to: 'elasticsearch' ignoreSha 'x-pack-core' - ignoreSha 'rest-proto' + ignoreSha 'sql-proto' } /********************************************** diff --git a/plugin/sql/jdbc/build.gradle b/plugin/sql/jdbc/build.gradle index 32712eeda81..56cbf9a2f8a 100644 --- a/plugin/sql/jdbc/build.gradle +++ b/plugin/sql/jdbc/build.gradle @@ -14,20 +14,20 @@ dependencies { * don't shadow properly. * * Note: we've temporarily disabled shading. */ - compile project(':x-pack-elasticsearch:sql:shared-client') - compile project(':x-pack-elasticsearch:sql:rest-proto') + compile project(':x-pack-elasticsearch:plugin:sql:sql-shared-client') + compile project(':x-pack-elasticsearch:plugin:sql:sql-proto') runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testCompile "org.elasticsearch.test:framework:${version}" } dependencyLicenses { - mapping from: /shared-client.*/, to: 'elasticsearch' + mapping from: /sql-proto.*/, to: 'elasticsearch' + mapping from: /sql-shared-client.*/, to: 'elasticsearch' mapping from: /jackson-.*/, to: 'jackson' - mapping from: /rest-proto.*/, to: 'elasticsearch' mapping from: /lucene-.*/, to: 'lucene' mapping from: /elasticsearch-core.*/, to: 'elasticsearch' - ignoreSha 'rest-proto' - ignoreSha 'shared-client' + ignoreSha 'sql-proto' + ignoreSha 'sql-shared-client' ignoreSha 'elasticsearch' ignoreSha 'elasticsearch-core' } diff --git a/plugin/sql/sql-cli/build.gradle b/plugin/sql/sql-cli/build.gradle index ae98f222a45..f131bccfef7 100644 --- a/plugin/sql/sql-cli/build.gradle +++ b/plugin/sql/sql-cli/build.gradle @@ -1,6 +1,6 @@ /* - * This project is named sql-cli because it is in the org.elasticsearch.plugin + * This project is named sql-cli because it is in the "org.elasticsearch.plugin" * group and it'd be super confusing for it to just be called "cli" there. * Also, the jar we ultimately want to ship is sql-cli-VERSION.jar which is * exactly what gradle makes by default when the project is named sql-cli. @@ -13,96 +13,96 @@ apply plugin: 'elasticsearch.build' description = 'Command line interface to Elasticsearch that speaks SQL' dependencies { - compile "org.jline:jline:3.3.1" - compile project(':x-pack-elasticsearch:sql:shared-client') - compile project(':x-pack-elasticsearch:sql:rest-proto') - compile "org.elasticsearch:elasticsearch-cli:${version}" + compile "org.jline:jline:3.3.1" + compile project(':x-pack-elasticsearch:plugin:sql:sql-shared-client') + compile project(':x-pack-elasticsearch:plugin:sql:sql-proto') + compile "org.elasticsearch:elasticsearch-cli:${version}" - runtime "org.fusesource.jansi:jansi:1.16" - runtime "org.elasticsearch:jna:${versions.jna}" + runtime "org.fusesource.jansi:jansi:1.16" + runtime "org.elasticsearch:jna:${versions.jna}" - testCompile "org.elasticsearch.test:framework:${version}" + testCompile "org.elasticsearch.test:framework:${version}" } dependencyLicenses { - mapping from: /rest-proto.*/, to: 'elasticsearch' - mapping from: /elasticsearch-core.*/, to: 'elasticsearch' - mapping from: /shared-client.*/, to: 'elasticsearch' - mapping from: /elasticsearch-cli.*/, to: 'elasticsearch' - mapping from: /jackson-.*/, to: 'jackson' - mapping from: /lucene-.*/, to: 'lucene' - ignoreSha 'rest-proto' - ignoreSha 'shared-client' - ignoreSha 'elasticsearch-cli' - ignoreSha 'elasticsearch-core' - ignoreSha 'elasticsearch' + mapping from: /elasticsearch-cli.*/, to: 'elasticsearch' + mapping from: /elasticsearch-core.*/, to: 'elasticsearch' + mapping from: /jackson-.*/, to: 'jackson' + mapping from: /lucene-.*/, to: 'lucene' + mapping from: /sql-proto.*/, to: 'elasticsearch' + mapping from: /sql-shared-client.*/, to: 'elasticsearch' + ignoreSha 'elasticsearch-cli' + ignoreSha 'elasticsearch-core' + ignoreSha 'elasticsearch' + ignoreSha 'sql-proto' + ignoreSha 'sql-shared-client' } jar { - // Bundle all dependencies into the jar. - from { - configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } - configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } - } - // Make the jar "executable" with `java -jar` - manifest { - attributes 'Main-Class': 'org.elasticsearch.xpack.sql.cli.Cli' - } + // Bundle all dependencies into the jar. + from { + configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + configurations.runtime.collect { it.isDirectory() ? it : zipTree(it) } + } + // Make the jar "executable" with `java -jar` + manifest { + attributes 'Main-Class': 'org.elasticsearch.xpack.sql.cli.Cli' + } } thirdPartyAudit.excludes = [ - 'org.apache.sshd.client.SshClient', - 'org.apache.sshd.client.auth.keyboard.UserInteraction', - 'org.apache.sshd.client.channel.ChannelShell', - 'org.apache.sshd.client.channel.ClientChannel', - 'org.apache.sshd.client.channel.ClientChannelEvent', - 'org.apache.sshd.client.future.AuthFuture', - 'org.apache.sshd.client.future.ConnectFuture', - 'org.apache.sshd.client.future.OpenFuture', - 'org.apache.sshd.client.session.ClientSession', - 'org.apache.sshd.common.Factory', - 'org.apache.sshd.common.channel.PtyMode', - 'org.apache.sshd.common.config.keys.FilePasswordProvider', - 'org.apache.sshd.common.util.io.NoCloseInputStream', - 'org.apache.sshd.common.util.io.NoCloseOutputStream', - 'org.apache.sshd.server.Command', - 'org.apache.sshd.server.Environment', - 'org.apache.sshd.server.ExitCallback', - 'org.apache.sshd.server.SessionAware', - 'org.apache.sshd.server.Signal', - 'org.apache.sshd.server.SshServer', - 'org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider', - 'org.apache.sshd.server.scp.ScpCommandFactory$Builder', - 'org.apache.sshd.server.session.ServerSession', - 'org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory$Builder', - 'org.mozilla.universalchardet.UniversalDetector' + 'org.apache.sshd.client.SshClient', + 'org.apache.sshd.client.auth.keyboard.UserInteraction', + 'org.apache.sshd.client.channel.ChannelShell', + 'org.apache.sshd.client.channel.ClientChannel', + 'org.apache.sshd.client.channel.ClientChannelEvent', + 'org.apache.sshd.client.future.AuthFuture', + 'org.apache.sshd.client.future.ConnectFuture', + 'org.apache.sshd.client.future.OpenFuture', + 'org.apache.sshd.client.session.ClientSession', + 'org.apache.sshd.common.Factory', + 'org.apache.sshd.common.channel.PtyMode', + 'org.apache.sshd.common.config.keys.FilePasswordProvider', + 'org.apache.sshd.common.util.io.NoCloseInputStream', + 'org.apache.sshd.common.util.io.NoCloseOutputStream', + 'org.apache.sshd.server.Command', + 'org.apache.sshd.server.Environment', + 'org.apache.sshd.server.ExitCallback', + 'org.apache.sshd.server.SessionAware', + 'org.apache.sshd.server.Signal', + 'org.apache.sshd.server.SshServer', + 'org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider', + 'org.apache.sshd.server.scp.ScpCommandFactory$Builder', + 'org.apache.sshd.server.session.ServerSession', + 'org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory$Builder', + 'org.mozilla.universalchardet.UniversalDetector' ] task runcli { - description = 'Run the CLI and connect to elasticsearch running on 9200' - dependsOn 'assemble' - doLast { - List command = [new File(project.runtimeJavaHome, 'bin/java').absolutePath] - if ('true'.equals(System.getProperty('debug', 'false'))) { - command += '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000' - } - command += ['-jar', jar.archivePath.absolutePath] - logger.info("running the cli with: ${command}") + description = 'Run the CLI and connect to elasticsearch running on 9200' + dependsOn 'assemble' + doLast { + List command = [new File(project.runtimeJavaHome, 'bin/java').absolutePath] + if ('true'.equals(System.getProperty('debug', 'false'))) { + command += '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000' + } + command += ['-jar', jar.archivePath.absolutePath] + logger.info("running the cli with: ${command}") - new ProcessBuilder(command) - .redirectOutput(ProcessBuilder.Redirect.INHERIT) - .redirectInput(ProcessBuilder.Redirect.INHERIT) - .redirectError(ProcessBuilder.Redirect.INHERIT) - .start() - .waitFor() - } + new ProcessBuilder(command) + .redirectOutput(ProcessBuilder.Redirect.INHERIT) + .redirectInput(ProcessBuilder.Redirect.INHERIT) + .redirectError(ProcessBuilder.Redirect.INHERIT) + .start() + .waitFor() + } } // Use the jar for testing so we can get the proper version information test { - classpath -= compileJava.outputs.files - classpath -= configurations.compile - classpath -= configurations.runtime - classpath += jar.outputs.files - dependsOn jar + classpath -= compileJava.outputs.files + classpath -= configurations.compile + classpath -= configurations.runtime + classpath += jar.outputs.files + dependsOn jar } diff --git a/sql/rest-proto/build.gradle b/plugin/sql/sql-proto/build.gradle similarity index 80% rename from sql/rest-proto/build.gradle rename to plugin/sql/sql-proto/build.gradle index 6d119635555..9ee55f57df2 100644 --- a/sql/rest-proto/build.gradle +++ b/plugin/sql/sql-proto/build.gradle @@ -1,30 +1,43 @@ -description = 'Request and response objects shared by the cli and ' + - 'its backend in :sql:server' + +/* + * This project is named sql-proto because it is in the + * "org.elasticsearch.plugin" group and it'd be super confusing for it to just + * be called "proto" there. + */ + +apply plugin: 'elasticsearch.build' + +description = 'Request and response objects shared by the cli, jdbc ' + + 'and the Elasticsearch plugin' dependencies { - compile (project(':server')) { - transitive = false - } - compile (project(':libs:elasticsearch-core')) { - transitive = false - } - compile "org.apache.lucene:lucene-core:${versions.lucene}" - compile 'joda-time:joda-time:2.9.9' - runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" - runtime "org.apache.logging.log4j:log4j-api:${versions.log4j}" - runtime "org.apache.logging.log4j:log4j-core:${versions.log4j}" + /* We'd like to just depend on xcontent but that hasn't been factored + * into its own project yet. So we drag in the server and a bunch of + * its dependencies. */ + compile (project(':server')) { + transitive = false + } + compile (project(':libs:elasticsearch-core')) { + transitive = false + } + compile "org.apache.lucene:lucene-core:${versions.lucene}" + compile 'joda-time:joda-time:2.9.9' + runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + runtime "org.apache.logging.log4j:log4j-api:${versions.log4j}" + runtime "org.apache.logging.log4j:log4j-core:${versions.log4j}" + + testCompile "org.elasticsearch.test:framework:${version}" } dependencyLicenses { - mapping from: /elasticsearch-core.*/, to: 'elasticsearch' - mapping from: /jackson-.*/, to: 'jackson' - mapping from: /lucene-.*/, to: 'lucene' - ignoreSha 'elasticsearch' - ignoreSha 'elasticsearch-core' + mapping from: /elasticsearch-core.*/, to: 'elasticsearch' + mapping from: /jackson-.*/, to: 'jackson' + mapping from: /lucene-.*/, to: 'lucene' + ignoreSha 'elasticsearch' + ignoreSha 'elasticsearch-core' } thirdPartyAudit.excludes = [ - 'com.fasterxml.jackson.dataformat.yaml.YAMLFactory', 'com.fasterxml.jackson.dataformat.yaml.YAMLMapper', diff --git a/sql/rest-proto/licenses/elasticsearch-LICENSE.txt b/plugin/sql/sql-proto/licenses/elasticsearch-LICENSE.txt similarity index 100% rename from sql/rest-proto/licenses/elasticsearch-LICENSE.txt rename to plugin/sql/sql-proto/licenses/elasticsearch-LICENSE.txt diff --git a/sql/rest-proto/licenses/elasticsearch-NOTICE.txt b/plugin/sql/sql-proto/licenses/elasticsearch-NOTICE.txt similarity index 100% rename from sql/rest-proto/licenses/elasticsearch-NOTICE.txt rename to plugin/sql/sql-proto/licenses/elasticsearch-NOTICE.txt diff --git a/sql/rest-proto/licenses/jackson-LICENSE b/plugin/sql/sql-proto/licenses/jackson-LICENSE similarity index 100% rename from sql/rest-proto/licenses/jackson-LICENSE rename to plugin/sql/sql-proto/licenses/jackson-LICENSE diff --git a/sql/rest-proto/licenses/jackson-NOTICE b/plugin/sql/sql-proto/licenses/jackson-NOTICE similarity index 100% rename from sql/rest-proto/licenses/jackson-NOTICE rename to plugin/sql/sql-proto/licenses/jackson-NOTICE diff --git a/sql/rest-proto/licenses/jackson-core-2.8.10.jar.sha1 b/plugin/sql/sql-proto/licenses/jackson-core-2.8.10.jar.sha1 similarity index 100% rename from sql/rest-proto/licenses/jackson-core-2.8.10.jar.sha1 rename to plugin/sql/sql-proto/licenses/jackson-core-2.8.10.jar.sha1 diff --git a/sql/rest-proto/licenses/joda-time-2.9.9.jar.sha1 b/plugin/sql/sql-proto/licenses/joda-time-2.9.9.jar.sha1 similarity index 100% rename from sql/rest-proto/licenses/joda-time-2.9.9.jar.sha1 rename to plugin/sql/sql-proto/licenses/joda-time-2.9.9.jar.sha1 diff --git a/sql/rest-proto/licenses/joda-time-LICENSE.txt b/plugin/sql/sql-proto/licenses/joda-time-LICENSE.txt similarity index 100% rename from sql/rest-proto/licenses/joda-time-LICENSE.txt rename to plugin/sql/sql-proto/licenses/joda-time-LICENSE.txt diff --git a/sql/rest-proto/licenses/joda-time-NOTICE.txt b/plugin/sql/sql-proto/licenses/joda-time-NOTICE.txt similarity index 100% rename from sql/rest-proto/licenses/joda-time-NOTICE.txt rename to plugin/sql/sql-proto/licenses/joda-time-NOTICE.txt diff --git a/sql/rest-proto/licenses/log4j-api-2.9.1.jar.sha1 b/plugin/sql/sql-proto/licenses/log4j-api-2.9.1.jar.sha1 similarity index 100% rename from sql/rest-proto/licenses/log4j-api-2.9.1.jar.sha1 rename to plugin/sql/sql-proto/licenses/log4j-api-2.9.1.jar.sha1 diff --git a/sql/rest-proto/licenses/log4j-api-LICENSE.txt b/plugin/sql/sql-proto/licenses/log4j-api-LICENSE.txt similarity index 100% rename from sql/rest-proto/licenses/log4j-api-LICENSE.txt rename to plugin/sql/sql-proto/licenses/log4j-api-LICENSE.txt diff --git a/sql/rest-proto/licenses/log4j-api-NOTICE.txt b/plugin/sql/sql-proto/licenses/log4j-api-NOTICE.txt similarity index 100% rename from sql/rest-proto/licenses/log4j-api-NOTICE.txt rename to plugin/sql/sql-proto/licenses/log4j-api-NOTICE.txt diff --git a/sql/rest-proto/licenses/log4j-core-2.9.1.jar.sha1 b/plugin/sql/sql-proto/licenses/log4j-core-2.9.1.jar.sha1 similarity index 100% rename from sql/rest-proto/licenses/log4j-core-2.9.1.jar.sha1 rename to plugin/sql/sql-proto/licenses/log4j-core-2.9.1.jar.sha1 diff --git a/sql/rest-proto/licenses/log4j-core-LICENSE.txt b/plugin/sql/sql-proto/licenses/log4j-core-LICENSE.txt similarity index 100% rename from sql/rest-proto/licenses/log4j-core-LICENSE.txt rename to plugin/sql/sql-proto/licenses/log4j-core-LICENSE.txt diff --git a/sql/rest-proto/licenses/log4j-core-NOTICE.txt b/plugin/sql/sql-proto/licenses/log4j-core-NOTICE.txt similarity index 100% rename from sql/rest-proto/licenses/log4j-core-NOTICE.txt rename to plugin/sql/sql-proto/licenses/log4j-core-NOTICE.txt diff --git a/sql/rest-proto/licenses/lucene-LICENSE.txt b/plugin/sql/sql-proto/licenses/lucene-LICENSE.txt similarity index 100% rename from sql/rest-proto/licenses/lucene-LICENSE.txt rename to plugin/sql/sql-proto/licenses/lucene-LICENSE.txt diff --git a/sql/rest-proto/licenses/lucene-NOTICE.txt b/plugin/sql/sql-proto/licenses/lucene-NOTICE.txt similarity index 100% rename from sql/rest-proto/licenses/lucene-NOTICE.txt rename to plugin/sql/sql-proto/licenses/lucene-NOTICE.txt diff --git a/sql/rest-proto/licenses/lucene-core-7.2.1.jar.sha1 b/plugin/sql/sql-proto/licenses/lucene-core-7.2.1.jar.sha1 similarity index 100% rename from sql/rest-proto/licenses/lucene-core-7.2.1.jar.sha1 rename to plugin/sql/sql-proto/licenses/lucene-core-7.2.1.jar.sha1 diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlQueryRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlQueryRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlQueryRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlQueryRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/AbstractSqlRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/CliFormatter.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/CliFormatter.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/CliFormatter.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/CliFormatter.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/ColumnInfo.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/ColumnInfo.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/ColumnInfo.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/ColumnInfo.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/MetaColumnInfo.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/MetaColumnInfo.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/MetaColumnInfo.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/MetaColumnInfo.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorAction.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorAction.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorAction.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorAction.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestBuilder.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestBuilder.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestBuilder.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestBuilder.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponse.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponse.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponse.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponse.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsAction.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsAction.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsAction.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsAction.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestBuilder.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestBuilder.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestBuilder.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestBuilder.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponse.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponse.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponse.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponse.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesAction.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesAction.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesAction.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesAction.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestBuilder.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestBuilder.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestBuilder.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestBuilder.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponse.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponse.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponse.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponse.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryAction.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryAction.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryAction.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryAction.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestBuilder.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestBuilder.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestBuilder.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestBuilder.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponse.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponse.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponse.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponse.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateAction.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateAction.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateAction.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateAction.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequest.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequest.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequest.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequest.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestBuilder.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestBuilder.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestBuilder.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestBuilder.java diff --git a/sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponse.java b/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponse.java similarity index 100% rename from sql/rest-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponse.java rename to plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponse.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorRequestTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponseTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponseTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponseTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlClearCursorResponseTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsRequestTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponseTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponseTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponseTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListColumnsResponseTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesRequestTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponseTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponseTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponseTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlListTablesResponseTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryRequestTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponseTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponseTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponseTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlQueryResponseTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTestUtils.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTestUtils.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTestUtils.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTestUtils.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateRequestTests.java diff --git a/sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponseTests.java b/plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponseTests.java similarity index 100% rename from sql/rest-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponseTests.java rename to plugin/sql/sql-proto/src/test/java/org/elasticsearch/xpack/sql/plugin/SqlTranslateResponseTests.java diff --git a/plugin/sql/sql-shared-client/build.gradle b/plugin/sql/sql-shared-client/build.gradle new file mode 100644 index 00000000000..4edd7ad25c1 --- /dev/null +++ b/plugin/sql/sql-shared-client/build.gradle @@ -0,0 +1,54 @@ + +/* + * This project is named sql-shared-client because it is in the + * "org.elasticsearch.plugin" group and it'd be super confusing for it to just + * be called "shared-client" there. + */ + +apply plugin: 'elasticsearch.build' + +description = 'Code shared between jdbc and cli' + +dependencies { + compile project(':x-pack-elasticsearch:plugin:sql:sql-proto') + compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" + testCompile "org.elasticsearch.test:framework:${version}" +} + +dependencyLicenses { + mapping from: /jackson-.*/, to: 'jackson' + mapping from: /sql-proto.*/, to: 'elasticsearch' + mapping from: /elasticsearch-cli.*/, to: 'elasticsearch' + mapping from: /elasticsearch-core.*/, to: 'elasticsearch' + mapping from: /lucene-.*/, to: 'lucene' + ignoreSha 'sql-proto' + ignoreSha 'elasticsearch' + ignoreSha 'elasticsearch-core' +} + +forbiddenApisMain { + // does not depend on core, so only jdk and http signatures should be checked + signaturesURLs = [this.class.getResource('/forbidden/jdk-signatures.txt')] +} + +forbiddenApisTest { + bundledSignatures -= 'jdk-non-portable' + bundledSignatures += 'jdk-internal' +} + +forbiddenPatterns { + exclude '**/*.keystore' +} + +// Allow for com.sun.net.httpserver.* usage for testing +eclipse { + classpath.file { + whenMerged { cp -> + def con = entries.find { e -> + e.kind == "con" && e.toString().contains("org.eclipse.jdt.launching.JRE_CONTAINER") + } + con.accessRules.add(new org.gradle.plugins.ide.eclipse.model.AccessRule( + "accessible", "com/sun/net/httpserver/*")) + } + } +} diff --git a/sql/shared-client/licenses/elasticsearch-LICENSE.txt b/plugin/sql/sql-shared-client/licenses/elasticsearch-LICENSE.txt similarity index 100% rename from sql/shared-client/licenses/elasticsearch-LICENSE.txt rename to plugin/sql/sql-shared-client/licenses/elasticsearch-LICENSE.txt diff --git a/sql/shared-client/licenses/elasticsearch-NOTICE.txt b/plugin/sql/sql-shared-client/licenses/elasticsearch-NOTICE.txt similarity index 100% rename from sql/shared-client/licenses/elasticsearch-NOTICE.txt rename to plugin/sql/sql-shared-client/licenses/elasticsearch-NOTICE.txt diff --git a/sql/shared-client/licenses/jackson-LICENSE b/plugin/sql/sql-shared-client/licenses/jackson-LICENSE similarity index 100% rename from sql/shared-client/licenses/jackson-LICENSE rename to plugin/sql/sql-shared-client/licenses/jackson-LICENSE diff --git a/sql/shared-client/licenses/jackson-NOTICE b/plugin/sql/sql-shared-client/licenses/jackson-NOTICE similarity index 100% rename from sql/shared-client/licenses/jackson-NOTICE rename to plugin/sql/sql-shared-client/licenses/jackson-NOTICE diff --git a/sql/shared-client/licenses/jackson-core-2.8.10.jar.sha1 b/plugin/sql/sql-shared-client/licenses/jackson-core-2.8.10.jar.sha1 similarity index 100% rename from sql/shared-client/licenses/jackson-core-2.8.10.jar.sha1 rename to plugin/sql/sql-shared-client/licenses/jackson-core-2.8.10.jar.sha1 diff --git a/sql/shared-client/licenses/joda-time-2.9.9.jar.sha1 b/plugin/sql/sql-shared-client/licenses/joda-time-2.9.9.jar.sha1 similarity index 100% rename from sql/shared-client/licenses/joda-time-2.9.9.jar.sha1 rename to plugin/sql/sql-shared-client/licenses/joda-time-2.9.9.jar.sha1 diff --git a/sql/shared-client/licenses/joda-time-LICENSE.txt b/plugin/sql/sql-shared-client/licenses/joda-time-LICENSE.txt similarity index 100% rename from sql/shared-client/licenses/joda-time-LICENSE.txt rename to plugin/sql/sql-shared-client/licenses/joda-time-LICENSE.txt diff --git a/sql/shared-client/licenses/joda-time-NOTICE.txt b/plugin/sql/sql-shared-client/licenses/joda-time-NOTICE.txt similarity index 100% rename from sql/shared-client/licenses/joda-time-NOTICE.txt rename to plugin/sql/sql-shared-client/licenses/joda-time-NOTICE.txt diff --git a/sql/shared-client/licenses/log4j-api-2.9.1.jar.sha1 b/plugin/sql/sql-shared-client/licenses/log4j-api-2.9.1.jar.sha1 similarity index 100% rename from sql/shared-client/licenses/log4j-api-2.9.1.jar.sha1 rename to plugin/sql/sql-shared-client/licenses/log4j-api-2.9.1.jar.sha1 diff --git a/sql/shared-client/licenses/log4j-api-LICENSE.txt b/plugin/sql/sql-shared-client/licenses/log4j-api-LICENSE.txt similarity index 100% rename from sql/shared-client/licenses/log4j-api-LICENSE.txt rename to plugin/sql/sql-shared-client/licenses/log4j-api-LICENSE.txt diff --git a/sql/shared-client/licenses/log4j-api-NOTICE.txt b/plugin/sql/sql-shared-client/licenses/log4j-api-NOTICE.txt similarity index 100% rename from sql/shared-client/licenses/log4j-api-NOTICE.txt rename to plugin/sql/sql-shared-client/licenses/log4j-api-NOTICE.txt diff --git a/sql/shared-client/licenses/log4j-core-2.9.1.jar.sha1 b/plugin/sql/sql-shared-client/licenses/log4j-core-2.9.1.jar.sha1 similarity index 100% rename from sql/shared-client/licenses/log4j-core-2.9.1.jar.sha1 rename to plugin/sql/sql-shared-client/licenses/log4j-core-2.9.1.jar.sha1 diff --git a/sql/shared-client/licenses/log4j-core-LICENSE.txt b/plugin/sql/sql-shared-client/licenses/log4j-core-LICENSE.txt similarity index 100% rename from sql/shared-client/licenses/log4j-core-LICENSE.txt rename to plugin/sql/sql-shared-client/licenses/log4j-core-LICENSE.txt diff --git a/sql/shared-client/licenses/log4j-core-NOTICE.txt b/plugin/sql/sql-shared-client/licenses/log4j-core-NOTICE.txt similarity index 100% rename from sql/shared-client/licenses/log4j-core-NOTICE.txt rename to plugin/sql/sql-shared-client/licenses/log4j-core-NOTICE.txt diff --git a/sql/shared-client/licenses/lucene-LICENSE.txt b/plugin/sql/sql-shared-client/licenses/lucene-LICENSE.txt similarity index 100% rename from sql/shared-client/licenses/lucene-LICENSE.txt rename to plugin/sql/sql-shared-client/licenses/lucene-LICENSE.txt diff --git a/sql/shared-client/licenses/lucene-NOTICE.txt b/plugin/sql/sql-shared-client/licenses/lucene-NOTICE.txt similarity index 100% rename from sql/shared-client/licenses/lucene-NOTICE.txt rename to plugin/sql/sql-shared-client/licenses/lucene-NOTICE.txt diff --git a/sql/shared-client/licenses/lucene-core-7.2.1.jar.sha1 b/plugin/sql/sql-shared-client/licenses/lucene-core-7.2.1.jar.sha1 similarity index 100% rename from sql/shared-client/licenses/lucene-core-7.2.1.jar.sha1 rename to plugin/sql/sql-shared-client/licenses/lucene-core-7.2.1.jar.sha1 diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/HttpClient.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/HttpClient.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/HttpClient.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/HttpClient.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Bytes.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Bytes.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Bytes.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Bytes.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedBiFunction.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedBiFunction.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedBiFunction.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedBiFunction.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedConsumer.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedConsumer.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedConsumer.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedConsumer.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedFunction.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedFunction.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedFunction.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/CheckedFunction.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ClientException.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ClientException.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ClientException.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ClientException.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ConnectionConfiguration.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ConnectionConfiguration.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ConnectionConfiguration.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ConnectionConfiguration.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/JreHttpUrlConnection.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/JreHttpUrlConnection.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/JreHttpUrlConnection.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/JreHttpUrlConnection.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ObjectUtils.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ObjectUtils.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ObjectUtils.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ObjectUtils.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ProxyConfig.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ProxyConfig.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ProxyConfig.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/ProxyConfig.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailure.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailure.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailure.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailure.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SslConfig.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SslConfig.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SslConfig.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SslConfig.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/StringUtils.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/StringUtils.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/StringUtils.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/StringUtils.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SuppressForbidden.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SuppressForbidden.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SuppressForbidden.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/SuppressForbidden.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/UriUtils.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/UriUtils.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/UriUtils.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/UriUtils.java diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java b/plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java similarity index 100% rename from sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java rename to plugin/sql/sql-shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java diff --git a/sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailureTests.java b/plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailureTests.java similarity index 100% rename from sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailureTests.java rename to plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/RemoteFailureTests.java diff --git a/sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/StringUtilsTests.java b/plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/StringUtilsTests.java similarity index 100% rename from sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/StringUtilsTests.java rename to plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/StringUtilsTests.java diff --git a/sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/UriUtilsTests.java b/plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/UriUtilsTests.java similarity index 100% rename from sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/UriUtilsTests.java rename to plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/UriUtilsTests.java diff --git a/sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/VersionTests.java b/plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/VersionTests.java similarity index 100% rename from sql/shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/VersionTests.java rename to plugin/sql/sql-shared-client/src/test/java/org/elasticsearch/xpack/sql/client/shared/VersionTests.java diff --git a/sql/shared-client/src/test/resources/remote_failure/basic.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/basic.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/basic.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/basic.json diff --git a/sql/shared-client/src/test/resources/remote_failure/bogus_error.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/bogus_error.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/bogus_error.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/bogus_error.json diff --git a/sql/shared-client/src/test/resources/remote_failure/invalid_json.txt b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/invalid_json.txt similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/invalid_json.txt rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/invalid_json.txt diff --git a/sql/shared-client/src/test/resources/remote_failure/missing_auth.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/missing_auth.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/missing_auth.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/missing_auth.json diff --git a/sql/shared-client/src/test/resources/remote_failure/nested.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/nested.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/nested.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/nested.json diff --git a/sql/shared-client/src/test/resources/remote_failure/no_error.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_error.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/no_error.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_error.json diff --git a/sql/shared-client/src/test/resources/remote_failure/no_stack.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_stack.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/no_stack.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_stack.json diff --git a/sql/shared-client/src/test/resources/remote_failure/no_type.json b/plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_type.json similarity index 100% rename from sql/shared-client/src/test/resources/remote_failure/no_type.json rename to plugin/sql/sql-shared-client/src/test/resources/remote_failure/no_type.json diff --git a/sql/shared-client/src/test/resources/ssl/client.keystore b/plugin/sql/sql-shared-client/src/test/resources/ssl/client.keystore similarity index 100% rename from sql/shared-client/src/test/resources/ssl/client.keystore rename to plugin/sql/sql-shared-client/src/test/resources/ssl/client.keystore diff --git a/sql/shared-client/src/test/resources/ssl/readme.txt b/plugin/sql/sql-shared-client/src/test/resources/ssl/readme.txt similarity index 100% rename from sql/shared-client/src/test/resources/ssl/readme.txt rename to plugin/sql/sql-shared-client/src/test/resources/ssl/readme.txt diff --git a/sql/shared-client/src/test/resources/ssl/server.keystore b/plugin/sql/sql-shared-client/src/test/resources/ssl/server.keystore similarity index 100% rename from sql/shared-client/src/test/resources/ssl/server.keystore rename to plugin/sql/sql-shared-client/src/test/resources/ssl/server.keystore diff --git a/sql/build.gradle b/sql/build.gradle deleted file mode 100644 index 68227109ba3..00000000000 --- a/sql/build.gradle +++ /dev/null @@ -1,11 +0,0 @@ -description = 'SQL for Elasticsearch' - -subprojects { - group = 'org.elasticsearch.sql' - - apply plugin: 'elasticsearch.build' - - dependencies { - testCompile "org.elasticsearch.test:framework:${version}" - } -} diff --git a/sql/shared-client/build.gradle b/sql/shared-client/build.gradle deleted file mode 100644 index 9479b5965ea..00000000000 --- a/sql/shared-client/build.gradle +++ /dev/null @@ -1,44 +0,0 @@ -description = 'Code shared between jdbc and cli' - -dependencies { - compile project(':x-pack-elasticsearch:sql:rest-proto') - compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" -} - -dependencyLicenses { - mapping from: /jackson-.*/, to: 'jackson' - mapping from: /rest-proto.*/, to: 'elasticsearch' - mapping from: /elasticsearch-cli.*/, to: 'elasticsearch' - mapping from: /elasticsearch-core.*/, to: 'elasticsearch' - mapping from: /lucene-.*/, to: 'lucene' - ignoreSha 'rest-proto' - ignoreSha 'elasticsearch' - ignoreSha 'elasticsearch-core' -} - -forbiddenApisMain { - // does not depend on core, so only jdk and http signatures should be checked - signaturesURLs = [this.class.getResource('/forbidden/jdk-signatures.txt')] -} - -forbiddenApisTest { - bundledSignatures -= 'jdk-non-portable' - bundledSignatures += 'jdk-internal' -} - -forbiddenPatterns { - exclude '**/*.keystore' -} - -// Allow for com.sun.net.httpserver.* usage for testing -eclipse { - classpath.file { - whenMerged { cp -> - def con = entries.find { e -> - e.kind == "con" && e.toString().contains("org.eclipse.jdt.launching.JRE_CONTAINER") - } - con.accessRules.add(new org.gradle.plugins.ide.eclipse.model.AccessRule( - "accessible", "com/sun/net/httpserver/*")) - } - } -}