SQL: Move top level sql directory into plugin/sql (elastic/x-pack-elasticsearch#3618)
This will conform to how we want the x-pack repo structured. relates elastic/x-pack-elasticsearch#3363 Original commit: elastic/x-pack-elasticsearch@f67e597bc8
This commit is contained in:
parent
9b6f417df6
commit
375ec896ce
|
@ -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"
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
||||
/**********************************************
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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',
|
||||
|
|
@ -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/*"))
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue