diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle deleted file mode 100644 index c882e03029..0000000000 --- a/buildSrc/build.gradle +++ /dev/null @@ -1,12 +0,0 @@ -apply plugin: 'groovy' -apply plugin: 'java' - - -repositories { - mavenCentral() -} - -dependencies { - implementation gradleApi() - implementation localGroovy() -} \ No newline at end of file diff --git a/common/build.gradle b/common/build.gradle index f7143a30ac..3f23b5cd31 100644 --- a/common/build.gradle +++ b/common/build.gradle @@ -23,7 +23,7 @@ */ plugins { - id 'java-library' + id 'java' id "io.freefair.lombok" } @@ -32,9 +32,9 @@ repositories { } dependencies { - api "org.antlr:antlr4-runtime:4.7.1" - api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - api group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' + compile "org.antlr:antlr4-runtime:4.7.1" + compile group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + compile group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' - testImplementation group: 'junit', name: 'junit', version: '4.13.2' + testCompile group: 'junit', name: 'junit', version: '4.13.2' } diff --git a/core/build.gradle b/core/build.gradle index f191032016..5ced00381a 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -23,7 +23,7 @@ */ plugins { - id 'java-library' + id 'java' id "io.freefair.lombok" id 'jacoco' } @@ -39,19 +39,19 @@ repositories { //} dependencies { - api group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - api group: 'org.springframework', name: 'spring-context', version: "${spring_version}" - api group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" - api group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - api group: 'com.facebook.presto', name: 'presto-matching', version: '0.240' - api group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' - api project(':common') + compile group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + compile group: 'org.springframework', name: 'spring-context', version: "${spring_version}" + compile group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + compile group: 'com.facebook.presto', name: 'presto-matching', version: '0.240' + compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1' + compile project(':common') testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.springframework', name: 'spring-test', version: "${spring_version}" - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' + testCompile group: 'org.springframework', name: 'spring-test', version: "${spring_version}" + testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3' + testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' } test { diff --git a/doctest/build.gradle b/doctest/build.gradle index 5dba958b9d..d889287bef 100644 --- a/doctest/build.gradle +++ b/doctest/build.gradle @@ -7,8 +7,8 @@ import java.util.concurrent.Callable import org.opensearch.gradle.testclusters.RunTask plugins { + id "com.wiredforcode.spawn" version "0.8.2" id 'base' - id 'com.wiredforcode.spawn' } apply plugin: 'opensearch.testclusters' diff --git a/integ-test/build.gradle b/integ-test/build.gradle index 80eab11d93..3a828d8677 100644 --- a/integ-test/build.gradle +++ b/integ-test/build.gradle @@ -55,31 +55,30 @@ configurations.all { } dependencies { - testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" - testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" - testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-client', version: "${opensearch_version}" - testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.1' - implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' - testImplementation project(':plugin') - testImplementation project(':legacy') + testCompile group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" + testCompile group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" + testCompile group: 'org.opensearch.client', name: 'opensearch-rest-client', version: "${opensearch_version}" + testCompile group: 'org.hamcrest', name: 'hamcrest', version: '2.1' + testCompile group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' + testCompile project(':plugin') + testCompile project(':legacy') testImplementation('org.junit.jupiter:junit-jupiter-api:5.6.2') testRuntimeOnly('org.junit.jupiter:junit-jupiter-engine:5.6.2') // JDBC drivers for comparison test. Somehow Apache Derby throws security permission exception. - testImplementation fileTree('../sql-jdbc/build/libs') { + testCompile fileTree('../sql-jdbc/build/libs') { include '*.jar' builtBy 'compileJdbc' } - testImplementation group: 'com.h2database', name: 'h2', version: '2.1.210' - testImplementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.28.0' - testImplementation group: 'com.google.code.gson', name: 'gson', version: '2.8.9' + testCompile group: 'com.h2database', name: 'h2', version: '2.1.210' + testCompile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.28.0' + testCompile group: 'com.google.code.gson', name: 'gson', version: '2.8.9' } dependencyLicenses.enabled = false testingConventions.enabled = false checkstyleTest.ignoreFailures = true forbiddenApisTest.enabled = false -thirdPartyAudit.enabled = false compileTestJava { options.compilerArgs.addAll(["-processor", 'lombok.launch.AnnotationProcessorHider$AnnotationProcessor']) @@ -142,6 +141,27 @@ integTest { } +task docTest(type: RestIntegTestTask) { + dependsOn ':plugin:bundlePlugin' + + systemProperty 'tests.security.manager', 'false' + systemProperty('project.root', project.projectDir.absolutePath) + + // Tell the test JVM if the cluster JVM is running under a debugger so that tests can use longer timeouts for + // requests. The 'doFirst' delays reading the debug setting on the cluster till execution time. + doFirst { systemProperty 'cluster.debug', getDebug() } + + if (System.getProperty("test.debug") != null) { + jvmArgs '-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005' + } + + include 'org/opensearch/sql/doctest/**/*IT.class' + exclude 'org/opensearch/sql/correctness/**/*IT.class' + exclude 'org/opensearch/sql/ppl/**/*IT.class' + exclude 'org/opensearch/sql/sql/**/*IT.class' + exclude 'org/opensearch/sql/legacy/**/*IT.class' +} + task comparisonTest(type: RestIntegTestTask) { dependsOn ':plugin:bundlePlugin' diff --git a/legacy/build.gradle b/legacy/build.gradle index 8cd146ff1c..06c694f25d 100644 --- a/legacy/build.gradle +++ b/legacy/build.gradle @@ -79,31 +79,31 @@ test { } dependencies { - implementation group: 'com.alibaba', name: 'druid', version:'1.0.15' - implementation group: 'org.locationtech.spatial4j', name: 'spatial4j', version:'0.7' - implementation group: "org.opensearch.plugin", name: 'parent-join-client', version: "${opensearch_version}" - implementation group: "org.opensearch.plugin", name: 'reindex-client', version: "${opensearch_version}" + compile group: 'com.alibaba', name: 'druid', version:'1.0.15' + compile group: 'org.locationtech.spatial4j', name: 'spatial4j', version:'0.7' + compile group: "org.opensearch.plugin", name: 'parent-join-client', version: "${opensearch_version}" + compile group: "org.opensearch.plugin", name: 'reindex-client', version: "${opensearch_version}" constraints { implementation('commons-codec:commons-codec:1.13') { because 'https://www.whitesourcesoftware.com/vulnerability-database/WS-2019-0379' } } implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation group: 'org.json', name: 'json', version:'20180813' - implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' - implementation group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" - api project(':sql') - api project(':common') - api project(':opensearch') + compile group: 'org.json', name: 'json', version:'20180813' + compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.10' + compile group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" + compile project(':sql') + compile project(':common') + compile project(':opensearch') // ANTLR gradle plugin and runtime dependency antlr "org.antlr:antlr4:4.7.1" - implementation "org.antlr:antlr4-runtime:4.7.1" + compile "org.antlr:antlr4-runtime:4.7.1" compileOnly group: 'javax.servlet', name: 'servlet-api', version:'2.5' - testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2' - testImplementation group: 'org.mockito', name: 'mockito-inline', version:'3.5.0' - testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation group: "org.opensearch.client", name: 'transport', version: "${opensearch_version}" + testCompile group: 'org.hamcrest', name: 'hamcrest-core', version:'2.2' + testCompile group: 'org.mockito', name: 'mockito-inline', version:'3.5.0' + testCompile group: 'junit', name: 'junit', version: '4.13.2' + testCompile group: "org.opensearch.client", name: 'transport', version: "${opensearch_version}" } diff --git a/opensearch/build.gradle b/opensearch/build.gradle index 2c4a13928e..88019a0542 100644 --- a/opensearch/build.gradle +++ b/opensearch/build.gradle @@ -23,28 +23,28 @@ */ plugins { - id 'java-library' + id 'java' id "io.freefair.lombok" id 'jacoco' } dependencies { - api project(':core') - api group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" - implementation "io.github.resilience4j:resilience4j-retry:1.5.0" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" - implementation group: 'org.json', name: 'json', version:'20180813' + compile project(':core') + compile group: 'org.opensearch', name: 'opensearch', version: "${opensearch_version}" + compile "io.github.resilience4j:resilience4j-retry:1.5.0" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" + compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + compile group: 'org.json', name: 'json', version:'20180813' compileOnly group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" - implementation group: 'org.opensearch', name:'opensearch-ml-client', version: '1.3.0.0-SNAPSHOT' + compile group: 'org.opensearch', name:'opensearch-ml-client', version: '1.3.4.0-SNAPSHOT' testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.5.0' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.5.0' - testImplementation group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" - testImplementation group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" + testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' + testCompile group: 'org.mockito', name: 'mockito-core', version: '3.5.0' + testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.5.0' + testCompile group: 'org.opensearch.client', name: 'opensearch-rest-high-level-client', version: "${opensearch_version}" + testCompile group: 'org.opensearch.test', name: 'framework', version: "${opensearch_version}" } test { diff --git a/plugin/build.gradle b/plugin/build.gradle index 1208c49b83..bd38048c01 100644 --- a/plugin/build.gradle +++ b/plugin/build.gradle @@ -62,10 +62,10 @@ configurations.all { } dependencies { - api group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" - api project(":ppl") - api project(':legacy') - api project(':opensearch') + compile group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" + compile project(":ppl") + compile project(':legacy') + compile project(':opensearch') } diff --git a/ppl/build.gradle b/ppl/build.gradle index 7cc3220dab..8b96d302d8 100644 --- a/ppl/build.gradle +++ b/ppl/build.gradle @@ -23,7 +23,7 @@ */ plugins { - id 'java-library' + id 'java' id "io.freefair.lombok" id 'jacoco' id 'antlr' @@ -44,20 +44,20 @@ configurations { dependencies { antlr "org.antlr:antlr4:4.7.1" - implementation "org.antlr:antlr4-runtime:4.7.1" - implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - api group: 'org.opensearch', name: 'opensearch-x-content', version: "${opensearch_version}" - api group: 'org.json', name: 'json', version: '20180813' - implementation group: 'org.springframework', name: 'spring-context', version: "${spring_version}" - implementation group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" - implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' - api project(':common') - api project(':core') - api project(':protocol') + compile "org.antlr:antlr4-runtime:4.7.1" + compile group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + compile group: 'org.opensearch', name: 'opensearch-x-content', version: "${opensearch_version}" + compile group: 'org.json', name: 'json', version: '20180813' + compile group: 'org.springframework', name: 'spring-context', version: "${spring_version}" + compile group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" + compile group: 'org.apache.logging.log4j', name: 'log4j-core', version:'2.17.1' + compile project(':common') + compile project(':core') + compile project(':protocol') - testImplementation group: 'junit', name: 'junit', version: '4.13.2' - testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' + testCompile group: 'junit', name: 'junit', version: '4.13.2' + testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' + testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3' } diff --git a/protocol/build.gradle b/protocol/build.gradle index 260829d7ca..bd36f4dc06 100644 --- a/protocol/build.gradle +++ b/protocol/build.gradle @@ -29,18 +29,18 @@ plugins { } dependencies { - implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" - implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" - implementation group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" + compile group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' + compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: "${jackson_version}" + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: "${jackson_databind_version}" + compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-cbor', version: "${jackson_version}" implementation 'com.google.code.gson:gson:2.8.9' - implementation project(':core') - implementation project(':opensearch') + compile project(':core') + compile project(':opensearch') testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' + testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3' + testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' } test { diff --git a/sql-jdbc/build.gradle b/sql-jdbc/build.gradle index 843651e40c..a4324080fd 100644 --- a/sql-jdbc/build.gradle +++ b/sql-jdbc/build.gradle @@ -24,7 +24,7 @@ plugins { group 'org.opensearch.client' // keep version in sync with version in Driver source -version '2.0.0.0' +version '1.3.0.0' boolean snapshot = "true".equals(System.getProperty("build.snapshot", "false")); if (snapshot) { diff --git a/sql/build.gradle b/sql/build.gradle index 496b9a7250..8572be7f3f 100644 --- a/sql/build.gradle +++ b/sql/build.gradle @@ -44,19 +44,19 @@ configurations { dependencies { antlr "org.antlr:antlr4:4.7.1" - implementation "org.antlr:antlr4-runtime:4.7.1" + compile "org.antlr:antlr4-runtime:4.7.1" implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre' - implementation group: 'org.json', name: 'json', version:'20180813' - implementation group: 'org.springframework', name: 'spring-context', version: "${spring_version}" - implementation group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" - implementation project(':common') - implementation project(':core') - api project(':protocol') + compile group: 'org.json', name: 'json', version:'20180813' + compile group: 'org.springframework', name: 'spring-context', version: "${spring_version}" + compile group: 'org.springframework', name: 'spring-beans', version: "${spring_version}" + compile project(':common') + compile project(':core') + compile project(':protocol') testImplementation('org.junit.jupiter:junit-jupiter:5.6.2') - testImplementation group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' - testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.3.3' - testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' + testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '2.1' + testCompile group: 'org.mockito', name: 'mockito-core', version: '3.3.3' + testCompile group: 'org.mockito', name: 'mockito-junit-jupiter', version: '3.3.3' } test {