OpenSearch/qa/sql/build.gradle
Nik Everett 76c764b379 SQL: Prepare JDBC for release (elastic/x-pack-elasticsearch#4341)
This changes JDBC so it can be released. It bundles the
`sql-shared-client` and `sql-proto` jars into the jar for the jdbc client.
It also Generates a pom for the jdbc driver when you run `gradle assemble`
on it. This will allow us to release the jdbc driver.

It also adds a zip distribution of the jdbc driver with all of its
dependencies bundled in the zip. It'd be nice to bundle all of the jdbc
driver's dependencies in the jar but we can't quite do that yet. So, for
now, to help folks using BI tools use the JDBC driver, we build a zip.

Original commit: elastic/x-pack-elasticsearch@9c668231d4
2018-04-12 15:43:35 -04:00

123 lines
4.6 KiB
Groovy

import org.elasticsearch.gradle.precommit.PrecommitTasks
import org.elasticsearch.gradle.test.RunTask
description = 'Integration tests for SQL'
apply plugin: 'elasticsearch.build'
archivesBaseName = 'qa-sql'
dependencies {
compile "org.elasticsearch.test:framework:${version}"
// JDBC testing dependencies
compile xpackProject('plugin:sql:jdbc')
compile "net.sourceforge.csvjdbc:csvjdbc:1.0.34"
// CLI testing dependencies
compile project(path: xpackModule('sql:sql-cli'), configuration: 'nodeps')
compile "org.jline:jline:3.6.0"
}
/* disable unit tests because these are all integration tests used
* other qa projects. */
test.enabled = false
dependencyLicenses.enabled = false
// the main files are actually test files, so use the appropriate forbidden api sigs
forbiddenApisMain {
signaturesURLs = [PrecommitTasks.getResource('/forbidden/es-all-signatures.txt'),
PrecommitTasks.getResource('/forbidden/es-test-signatures.txt')]
}
thirdPartyAudit.excludes = [
// jLine's optional dependencies
'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.fusesource.jansi.Ansi',
'org.fusesource.jansi.internal.CLibrary$Termios',
'org.fusesource.jansi.internal.CLibrary$WinSize',
'org.fusesource.jansi.internal.CLibrary',
'org.fusesource.jansi.internal.Kernel32$CHAR_INFO',
'org.fusesource.jansi.internal.Kernel32$CONSOLE_SCREEN_BUFFER_INFO',
'org.fusesource.jansi.internal.Kernel32$COORD',
'org.fusesource.jansi.internal.Kernel32$FOCUS_EVENT_RECORD',
'org.fusesource.jansi.internal.Kernel32$INPUT_RECORD',
'org.fusesource.jansi.internal.Kernel32$KEY_EVENT_RECORD',
'org.fusesource.jansi.internal.Kernel32$MOUSE_EVENT_RECORD',
'org.fusesource.jansi.internal.Kernel32$SMALL_RECT',
'org.fusesource.jansi.internal.Kernel32',
'org.fusesource.jansi.internal.WindowsSupport',
'org.mozilla.universalchardet.UniversalDetector',
]
subprojects {
apply plugin: 'elasticsearch.standalone-rest-test'
dependencies {
/* Since we're a standalone rest test we actually get transitive
* dependencies but we don't really want them because they cause
* all kinds of trouble with the jar hell checks. So we suppress
* them explicitly for non-es projects. */
testCompile(xpackProject('qa:sql')) {
transitive = false
}
testCompile "org.elasticsearch.test:framework:${version}"
// JDBC testing dependencies
testRuntime "net.sourceforge.csvjdbc:csvjdbc:1.0.34"
testRuntime "com.h2database:h2:1.4.197"
testRuntime xpackProject('plugin:sql:jdbc')
// TODO check if needed
testRuntime("org.antlr:antlr4-runtime:4.5.3") {
transitive = false
}
// CLI testing dependencies
testRuntime project(path: xpackModule('sql:sql-cli'), configuration: 'nodeps')
testRuntime "org.jline:jline:3.6.0"
}
if (project.name != 'security') {
// The security project just configures its subprojects
apply plugin: 'elasticsearch.rest-test'
integTestCluster {
plugin xpackProject('plugin').path
setting 'xpack.monitoring.enabled', 'false'
setting 'xpack.ml.enabled', 'false'
setting 'xpack.watcher.enabled', 'false'
setting 'script.max_compilations_rate', '1000/1m'
}
task runqa(type: RunTask) {
plugin xpackProject('plugin').path
setting 'xpack.monitoring.enabled', 'false'
setting 'xpack.ml.enabled', 'false'
setting 'xpack.watcher.enabled', 'false'
setting 'script.max_compilations_rate', '1000/1m'
}
}
}