diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f96ef5dd1d5e..00996c21cd52 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -109,17 +109,16 @@ and `JAVA11_HOME` available so that the tests can pass. Elasticsearch uses the Gradle wrapper for its build. You can execute Gradle using the wrapper via the `gradlew` script in the root of the repository. -We support development in the Eclipse and IntelliJ IDEs. For Eclipse, the -minimum version that we support is [Eclipse Oxygen][eclipse] (version 4.7). For -IntelliJ, the minimum version that we support is [IntelliJ 2017.2][intellij]. +We support development in the Eclipse and IntelliJ IDEs. +For Eclipse, the minimum version that we support is [4.13][eclipse]. +For IntelliJ, the minimum version that we support is [IntelliJ 2017.2][intellij]. ### Configuring IDEs And Running Tests Eclipse users can automatically configure their IDE: `./gradlew eclipse` -then `File: Import: Existing Projects into Workspace`. Select the -option `Search for nested projects`. Additionally you will want to -ensure that Eclipse is using 2048m of heap by modifying `eclipse.ini` -accordingly to avoid GC overhead errors. +then `File: Import: Gradle : Existing Gradle Project`. +Additionally you will want to ensure that Eclipse is using 2048m of heap by modifying +`eclipse.ini` accordingly to avoid GC overhead and OOM errors. IntelliJ users can automatically configure their IDE: `./gradlew idea` then `File->New Project From Existing Sources`. Point to the root of @@ -437,6 +436,6 @@ Finally, we require that you run `./gradlew check` before submitting a non-documentation contribution. This is mentioned above, but it is worth repeating in this section because it has come up in this context. -[eclipse]: http://www.eclipse.org/community/eclipse_newsletter/2017/june/ +[eclipse]: https://download.eclipse.org/eclipse/downloads/drops4/R-4.13-201909161045/ [intellij]: https://blog.jetbrains.com/idea/2017/07/intellij-idea-2017-2-is-here-smart-sleek-and-snappy/ [shadow-plugin]: https://github.com/johnrengelman/shadow diff --git a/build.gradle b/build.gradle index 34d43545bce2..82203b9a45b4 100644 --- a/build.gradle +++ b/build.gradle @@ -381,29 +381,19 @@ allprojects { } plugins.withType(JavaBasePlugin) { - File eclipseBuild = project.file('build-eclipse') - eclipse.classpath.defaultOutputDir = eclipseBuild - if (isEclipse) { - // set this so generated dirs will be relative to eclipse build - project.buildDir = eclipseBuild - // Work around https://docs.gradle.org/current/userguide/java_gradle_plugin.html confusing Eclipse by the metadata - // it adds to the classpath - project.file("$buildDir/pluginUnderTestMetadata").mkdirs() - } + eclipse.classpath.defaultOutputDir = file('build-eclipse') eclipse.classpath.file.whenMerged { classpath -> // give each source folder a unique corresponding output folder int i = 0; classpath.entries.findAll { it instanceof SourceFolder }.each { folder -> i++; - // this is *NOT* a path or a file. folder.output = "build-eclipse/" + i } } } - File licenseHeaderFile; - String prefix = ':x-pack'; - + File licenseHeaderFile + String prefix = ':x-pack' if (Os.isFamily(Os.FAMILY_WINDOWS)) { prefix = prefix.replace(':', '_') } diff --git a/buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs b/buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs index 2cd0ba1d9a51..285b882a154b 100644 --- a/buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs +++ b/buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs @@ -15,6 +15,8 @@ eclipse.preferences.version=1 # org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning # org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +# We check this in Gradle. Eclipse fails this check because it doesn't have separate class-paths for +org.eclipse.jdt.core.circularClasspath=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.formatter.comment.line_length=140 org.eclipse.jdt.core.formatter.lineSplit=140 diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle index 05ff486c7449..e8c5f4d53f1a 100644 --- a/client/rest-high-level/build.gradle +++ b/client/rest-high-level/build.gradle @@ -70,10 +70,8 @@ dependencies { testCompile project(":rest-api-spec") // Needed for serialization tests: // (In order to serialize a server side class to a client side class or the other way around) - if (isEclipse == false || project.path == ":client:rest-high-level-tests") { - testCompile(project(':x-pack:plugin:core')) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-rest-high-level-client' - } + testCompile(project(':x-pack:plugin:core')) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-rest-high-level-client' } restSpec project(':rest-api-spec') @@ -103,19 +101,6 @@ forbiddenApisMain { signaturesFiles += files('src/main/resources/forbidden/rest-high-level-signatures.txt') } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":client:rest-high-level") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - File nodeCert = file("./testnode.crt") File nodeTrustStore = file("./testnode.jks") File pkiTrustCert = file("./src/test/resources/org/elasticsearch/client/security/delegate_pki/testRootCA.crt") diff --git a/client/rest-high-level/src/main/eclipse-build.gradle b/client/rest-high-level/src/main/eclipse-build.gradle deleted file mode 100644 index 6bc7562f7fde..000000000000 --- a/client/rest-high-level/src/main/eclipse-build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' diff --git a/client/rest-high-level/src/test/eclipse-build.gradle b/client/rest-high-level/src/test/eclipse-build.gradle deleted file mode 100644 index 56d355658879..000000000000 --- a/client/rest-high-level/src/test/eclipse-build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':client:rest-high-level') -} diff --git a/libs/build.gradle b/libs/build.gradle index 03b5d2c611e7..87d4838de732 100644 --- a/libs/build.gradle +++ b/libs/build.gradle @@ -34,7 +34,6 @@ subprojects { Project depProject = dep.dependencyProject if (depProject != null && false == depProject.path.equals(':libs:elasticsearch-core') - && false == isEclipse && depProject.path.startsWith(':libs')) { throw new InvalidUserDataException("projects in :libs " + "may not depend on other projects libs except " diff --git a/libs/core/.classpath1 b/libs/core/.classpath1 new file mode 100644 index 000000000000..348ab88da675 --- /dev/null +++ b/libs/core/.classpath1 @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/libs/core/build.gradle b/libs/core/build.gradle index 44eb9eee636e..e888ffc416fd 100644 --- a/libs/core/build.gradle +++ b/libs/core/build.gradle @@ -29,10 +29,8 @@ dependencies { testCompile "junit:junit:${versions.junit}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" - if (isEclipse == false || project.path == ":libs:elasticsearch-core-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-core' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-core' } } @@ -42,19 +40,6 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-core") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - thirdPartyAudit.ignoreMissingClasses ( // from log4j 'org/osgi/framework/AdaptPermission', diff --git a/libs/core/src/main/eclipse-build.gradle b/libs/core/src/main/eclipse-build.gradle deleted file mode 100644 index 6bc7562f7fde..000000000000 --- a/libs/core/src/main/eclipse-build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' diff --git a/libs/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java b/libs/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java index 277698bd8cc7..91edbbc3c1f6 100644 --- a/libs/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java +++ b/libs/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java @@ -134,8 +134,13 @@ public class JarHell { } // now just parse as ordinary file try { - URL url = PathUtils.get(element).toUri().toURL(); - if (urlElements.add(url) == false) { + if (element .equals("/")) { + // Eclipse adds this to the classpath when running unit tests... + continue; + } + URL url = PathUtils.get(element).toUri().toURL(); + // junit4.childvm.count + if (urlElements.add(url) == false && element.endsWith(".jar")) { throw new IllegalStateException("jar hell!" + System.lineSeparator() + "duplicate jar [" + element + "] on classpath: " + classPath); } diff --git a/libs/core/src/test/eclipse-build.gradle b/libs/core/src/test/eclipse-build.gradle deleted file mode 100644 index 9fb1d2cac390..000000000000 --- a/libs/core/src/test/eclipse-build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-core') -} diff --git a/libs/dissect/build.gradle b/libs/dissect/build.gradle index 7e71f86f64f4..7c89985c24bf 100644 --- a/libs/dissect/build.gradle +++ b/libs/dissect/build.gradle @@ -18,10 +18,8 @@ */ dependencies { - if (isEclipse == false || project.path == ":libs:elasticsearch-dissect-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect' } testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" @@ -32,15 +30,3 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-dissect") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} diff --git a/libs/dissect/src/main/eclipse-build.gradle b/libs/dissect/src/main/eclipse-build.gradle deleted file mode 100644 index c2b72bd21e1f..000000000000 --- a/libs/dissect/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for dissect src and tests -apply from: '../../build.gradle' diff --git a/libs/dissect/src/test/eclipse-build.gradle b/libs/dissect/src/test/eclipse-build.gradle deleted file mode 100644 index c10fea5e2b74..000000000000 --- a/libs/dissect/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for dissect src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-dissect') -} diff --git a/libs/geo/build.gradle b/libs/geo/build.gradle index e2e5a11d5358..1863a63a9e84 100644 --- a/libs/geo/build.gradle +++ b/libs/geo/build.gradle @@ -22,10 +22,8 @@ apply plugin: 'nebula.maven-base-publish' apply plugin: 'nebula.maven-scm' dependencies { - if (isEclipse == false || project.path == ":libs:elasticsearch-geo-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-geo' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-geo' } } @@ -35,15 +33,3 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-geo") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} diff --git a/libs/geo/src/main/eclipse-build.gradle b/libs/geo/src/main/eclipse-build.gradle deleted file mode 100644 index 4864452846b1..000000000000 --- a/libs/geo/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for geo src and tests -apply from: '../../build.gradle' diff --git a/libs/geo/src/test/eclipse-build.gradle b/libs/geo/src/test/eclipse-build.gradle deleted file mode 100644 index 8dc16debdde3..000000000000 --- a/libs/geo/src/test/eclipse-build.gradle +++ /dev/null @@ -1,6 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for geo src and tests -apply from: '../../build.gradle' -dependencies { - testCompile project(':libs:elasticsearch-geo') -} \ No newline at end of file diff --git a/libs/grok/build.gradle b/libs/grok/build.gradle index b7ae54e54c3a..87dc1b8b6184 100644 --- a/libs/grok/build.gradle +++ b/libs/grok/build.gradle @@ -22,10 +22,8 @@ dependencies { // joni dependencies: compile 'org.jruby.jcodings:jcodings:1.0.44' - if (isEclipse == false || project.path == ":libs:elasticsearch-grok-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-grok' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-grok' } } @@ -33,19 +31,6 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-grok") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - thirdPartyAudit.ignoreMissingClasses ( // joni has AsmCompilerSupport, but that isn't being used: 'org.objectweb.asm.ClassWriter', diff --git a/libs/grok/src/main/eclipse-build.gradle b/libs/grok/src/main/eclipse-build.gradle deleted file mode 100644 index 3188c7aff01f..000000000000 --- a/libs/grok/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for grok src and tests -apply from: '../../build.gradle' diff --git a/libs/grok/src/test/eclipse-build.gradle b/libs/grok/src/test/eclipse-build.gradle deleted file mode 100644 index 606aaffa121a..000000000000 --- a/libs/grok/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for grok src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-grok') -} diff --git a/libs/nio/build.gradle b/libs/nio/build.gradle index d6d0eaea0ab8..db09a6e7c2fa 100644 --- a/libs/nio/build.gradle +++ b/libs/nio/build.gradle @@ -26,25 +26,11 @@ dependencies { testCompile "junit:junit:${versions.junit}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" - if (isEclipse == false || project.path == ":libs:elasticsearch-nio-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-nio' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-nio' } } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-nio") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} forbiddenApisMain { // nio does not depend on core, so only jdk signatures should be checked diff --git a/libs/nio/src/main/eclipse-build.gradle b/libs/nio/src/main/eclipse-build.gradle deleted file mode 100644 index ae3ab2b13a11..000000000000 --- a/libs/nio/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for nio src and tests -apply from: '../../build.gradle' diff --git a/libs/nio/src/test/eclipse-build.gradle b/libs/nio/src/test/eclipse-build.gradle deleted file mode 100644 index f7e152311ad5..000000000000 --- a/libs/nio/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for nio src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-nio') -} diff --git a/libs/secure-sm/build.gradle b/libs/secure-sm/build.gradle index 3e79d9ee2e84..068a140da379 100644 --- a/libs/secure-sm/build.gradle +++ b/libs/secure-sm/build.gradle @@ -25,11 +25,9 @@ dependencies { testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "junit:junit:${versions.junit}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" - - if (isEclipse == false || project.path == ":libs:elasticsearch-secure-sm-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm' - } + + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm' } } @@ -37,19 +35,6 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in Eclipse the project is under a fake root so we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-secure-sm") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - // JAR hell is part of core which we do not want to add as a dependency jarHell.enabled = false diff --git a/libs/secure-sm/src/main/eclipse-build.gradle b/libs/secure-sm/src/main/eclipse-build.gradle deleted file mode 100644 index a17f08978118..000000000000 --- a/libs/secure-sm/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for secure-sm src and tests -apply from: '../../build.gradle' diff --git a/libs/secure-sm/src/test/eclipse-build.gradle b/libs/secure-sm/src/test/eclipse-build.gradle deleted file mode 100644 index 63d610b75c1d..000000000000 --- a/libs/secure-sm/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for secure-sm src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-secure-sm') -} diff --git a/libs/ssl-config/build.gradle b/libs/ssl-config/build.gradle index 71ebd642a433..bae6b00f5ad3 100644 --- a/libs/ssl-config/build.gradle +++ b/libs/ssl-config/build.gradle @@ -21,10 +21,8 @@ apply plugin: "nebula.maven-scm" dependencies { compile project(':libs:elasticsearch-core') - if (isEclipse == false || project.path == ":libs:elasticsearch-ssl-config-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config' } testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" @@ -32,18 +30,6 @@ dependencies { testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-ssl-config") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' diff --git a/libs/ssl-config/src/main/eclipse-build.gradle b/libs/ssl-config/src/main/eclipse-build.gradle deleted file mode 100644 index be8b9d5b3b0b..000000000000 --- a/libs/ssl-config/src/main/eclipse-build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for ssl-config src and tests -apply from: '../../build.gradle' diff --git a/libs/ssl-config/src/test/eclipse-build.gradle b/libs/ssl-config/src/test/eclipse-build.gradle deleted file mode 100644 index aca207a09b7c..000000000000 --- a/libs/ssl-config/src/test/eclipse-build.gradle +++ /dev/null @@ -1,5 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for ssl-config src and tests -apply from: '../../build.gradle' -dependencies { - testCompile project(':libs:elasticsearch-ssl-config') -} diff --git a/libs/x-content/build.gradle b/libs/x-content/build.gradle index e54427c05830..ee8e520cdb13 100644 --- a/libs/x-content/build.gradle +++ b/libs/x-content/build.gradle @@ -34,10 +34,8 @@ dependencies { testCompile "junit:junit:${versions.junit}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" - if (isEclipse == false || project.path == ":libs:elasticsearch-x-content-tests") { - testCompile(project(":test:framework")) { - exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content' - } + testCompile(project(":test:framework")) { + exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content' } } @@ -48,19 +46,6 @@ forbiddenApisMain { replaceSignatureFiles 'jdk-signatures' } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-x-content") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - thirdPartyAudit.ignoreMissingClasses ( // from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml) 'com.fasterxml.jackson.databind.ObjectMapper', diff --git a/libs/x-content/src/main/eclipse-build.gradle b/libs/x-content/src/main/eclipse-build.gradle deleted file mode 100644 index a17f08978118..000000000000 --- a/libs/x-content/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for secure-sm src and tests -apply from: '../../build.gradle' diff --git a/libs/x-content/src/test/eclipse-build.gradle b/libs/x-content/src/test/eclipse-build.gradle deleted file mode 100644 index a8d81f9f9583..000000000000 --- a/libs/x-content/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for secure-sm src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':libs:elasticsearch-x-content') -} diff --git a/plugins/repository-hdfs/build.gradle b/plugins/repository-hdfs/build.gradle index b14b9c712ff8..4b98cf502e6a 100644 --- a/plugins/repository-hdfs/build.gradle +++ b/plugins/repository-hdfs/build.gradle @@ -68,7 +68,9 @@ dependencies { hdfsFixture project(':test:fixtures:hdfs-fixture') // Set the keytab files in the classpath so that we can access them from test code without the security manager // freaking out. - testRuntime files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs","hdfs_hdfs.build.elastic.co.keytab").parent) + if (isEclipse == false) { + testRuntime files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs","hdfs_hdfs.build.elastic.co.keytab").parent) + } } normalization { diff --git a/server/build.gradle b/server/build.gradle index 33fab57bc062..4fd1a5cad321 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -78,7 +78,7 @@ dependencies { compile project(':libs:elasticsearch-secure-sm') compile project(':libs:elasticsearch-x-content') compile project(":libs:elasticsearch-geo") - + compileOnly project(':libs:elasticsearch-plugin-classloader') testRuntime project(':libs:elasticsearch-plugin-classloader') @@ -126,25 +126,11 @@ dependencies { java12Compile sourceSets.main.output } - if (isEclipse == false || project.path == ":server-tests") { - testCompile(project(":test:framework")) { - // tests use the locally compiled version of server - exclude group: 'org.elasticsearch', module: 'server' - } + testCompile(project(":test:framework")) { + // tests use the locally compiled version of server + exclude group: 'org.elasticsearch', module: 'server' } -} -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":server") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } } compileJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked" @@ -324,18 +310,18 @@ dependencyLicenses { } } -if (isEclipse == false || project.path == ":server-tests") { - task integTest(type: Test) { - description = 'Multi-node tests' - mustRunAfter test - include '**/*IT.class' - } +task integTest(type: Test) { + description = 'Multi-node tests' + mustRunAfter test - check.dependsOn integTest - - task internalClusterTest { - dependsOn integTest - } + include '**/*IT.class' } +check.dependsOn integTest + +task internalClusterTest { + dependsOn integTest +} + + diff --git a/server/src/main/eclipse-build.gradle b/server/src/main/eclipse-build.gradle deleted file mode 100644 index e46e71344564..000000000000 --- a/server/src/main/eclipse-build.gradle +++ /dev/null @@ -1,3 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' diff --git a/server/src/test/eclipse-build.gradle b/server/src/test/eclipse-build.gradle deleted file mode 100644 index dd380e342b63..000000000000 --- a/server/src/test/eclipse-build.gradle +++ /dev/null @@ -1,7 +0,0 @@ - -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':server') -} diff --git a/settings.gradle b/settings.gradle index 8346fc3b8d45..78c529e9b145 100644 --- a/settings.gradle +++ b/settings.gradle @@ -94,26 +94,7 @@ addSubProjects('', new File(rootProject.projectDir, 'qa')) addSubProjects('', new File(rootProject.projectDir, 'x-pack')) List startTasks = gradle.startParameter.taskNames -boolean isEclipse = - System.getProperty("eclipse.launcher") != null || // Detects gradle launched from the Eclipse IDE - System.getProperty("eclipse.application") != null || // Detects gradle launched from the Eclipse compiler server - startTasks.contains("eclipse") || // Detects gradle launched from the command line to do Eclipse stuff - startTasks.contains("cleanEclipse"); -if (isEclipse) { - // eclipse cannot handle an intermediate dependency between main and test, so we must create separate projects - // for server-src and server-tests - projects << 'server-tests' - projects << 'libs:core-tests' - projects << 'libs:dissect-tests' - projects << 'libs:nio-tests' - projects << 'libs:x-content-tests' - projects << 'libs:secure-sm-tests' - projects << 'libs:grok-tests' - projects << 'libs:geo-tests' - projects << 'libs:ssl-config-tests' - projects << 'client:rest-high-level-tests' - projects << 'x-pack:plugin:core-tests' -} + include projects.toArray(new String[0]) @@ -124,54 +105,6 @@ project(":libs").children.each { libsProject -> libsProject.name = "elasticsearch-${libsProject.name}" } -if (isEclipse) { - project(":server").projectDir = new File(rootProject.projectDir, 'server/src/main') - project(":server").buildFileName = 'eclipse-build.gradle' - project(":server-tests").projectDir = new File(rootProject.projectDir, 'server/src/test') - project(":server-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-core").projectDir = new File(rootProject.projectDir, 'libs/core/src/main') - project(":libs:elasticsearch-core").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-core-tests").projectDir = new File(rootProject.projectDir, 'libs/core/src/test') - project(":libs:elasticsearch-core-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-dissect").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/main') - project(":libs:elasticsearch-dissect").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-dissect-tests").projectDir = new File(rootProject.projectDir, 'libs/dissect/src/test') - project(":libs:elasticsearch-dissect-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-nio").projectDir = new File(rootProject.projectDir, 'libs/nio/src/main') - project(":libs:elasticsearch-nio").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-nio-tests").projectDir = new File(rootProject.projectDir, 'libs/nio/src/test') - project(":libs:elasticsearch-nio-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-x-content").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/main') - project(":libs:elasticsearch-x-content").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-x-content-tests").projectDir = new File(rootProject.projectDir, 'libs/x-content/src/test') - project(":libs:elasticsearch-x-content-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-secure-sm").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/main') - project(":libs:elasticsearch-secure-sm").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-secure-sm-tests").projectDir = new File(rootProject.projectDir, 'libs/secure-sm/src/test') - project(":libs:elasticsearch-secure-sm-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-grok").projectDir = new File(rootProject.projectDir, 'libs/grok/src/main') - project(":libs:elasticsearch-grok").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-grok-tests").projectDir = new File(rootProject.projectDir, 'libs/grok/src/test') - project(":libs:elasticsearch-grok-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-geo").projectDir = new File(rootProject.projectDir, 'libs/geo/src/main') - project(":libs:elasticsearch-geo").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-geo-tests").projectDir = new File(rootProject.projectDir, 'libs/geo/src/test') - project(":libs:elasticsearch-geo-tests").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-ssl-config").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/main') - project(":libs:elasticsearch-ssl-config").buildFileName = 'eclipse-build.gradle' - project(":libs:elasticsearch-ssl-config-tests").projectDir = new File(rootProject.projectDir, 'libs/ssl-config/src/test') - project(":libs:elasticsearch-ssl-config-tests").buildFileName = 'eclipse-build.gradle' - project(":client:rest-high-level").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/main') - project(":client:rest-high-level").buildFileName = 'eclipse-build.gradle' - project(":client:rest-high-level-tests").projectDir = new File(rootProject.projectDir, 'client/rest-high-level/src/test') - project(":client:rest-high-level-tests").buildFileName = 'eclipse-build.gradle' - project(":x-pack:plugin:core").projectDir = new File(rootProject.projectDir, 'x-pack/plugin/core/src/main') - project(":x-pack:plugin:core").buildFileName = 'eclipse-build.gradle' - project(":x-pack:plugin:core-tests").projectDir = new File(rootProject.projectDir, 'x-pack/plugin/core/src/test') - project(":x-pack:plugin:core-tests").buildFileName = 'eclipse-build.gradle' - -} - // look for extra plugins for elasticsearch File extraProjects = new File(rootProject.projectDir.parentFile, "${dirName}-extra") if (extraProjects.exists()) { diff --git a/x-pack/docs/build.gradle b/x-pack/docs/build.gradle index df4a318e1ffd..0854c9e4036b 100644 --- a/x-pack/docs/build.gradle +++ b/x-pack/docs/build.gradle @@ -20,9 +20,6 @@ buildRestTests.expectedUnconvertedCandidates = [ dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackProject('plugin').path, configuration: 'testArtifacts') } diff --git a/x-pack/plugin/analytics/build.gradle b/x-pack/plugin/analytics/build.gradle index 19799b750fd9..f6521fa94bf7 100644 --- a/x-pack/plugin/analytics/build.gradle +++ b/x-pack/plugin/analytics/build.gradle @@ -18,9 +18,6 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.enabled = false diff --git a/x-pack/plugin/build.gradle b/x-pack/plugin/build.gradle index 210888b87f15..b0fbfbb14b12 100644 --- a/x-pack/plugin/build.gradle +++ b/x-pack/plugin/build.gradle @@ -6,9 +6,6 @@ archivesBaseName = 'x-pack' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // https://github.com/elastic/x-plugins/issues/724 diff --git a/x-pack/plugin/ccr/build.gradle b/x-pack/plugin/ccr/build.gradle index dfc3b85dfe11..ec0cd38e7021 100644 --- a/x-pack/plugin/ccr/build.gradle +++ b/x-pack/plugin/ccr/build.gradle @@ -52,9 +52,6 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('monitoring'), configuration: 'testArtifacts') } diff --git a/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle b/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle index bbae2935d4f0..a44a18f858c8 100644 --- a/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle +++ b/x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ccr'), configuration: 'runtime') testCompile project(':x-pack:plugin:ccr:qa') } diff --git a/x-pack/plugin/ccr/qa/multi-cluster/build.gradle b/x-pack/plugin/ccr/qa/multi-cluster/build.gradle index 178808316684..20e86c1d81fa 100644 --- a/x-pack/plugin/ccr/qa/multi-cluster/build.gradle +++ b/x-pack/plugin/ccr/qa/multi-cluster/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ccr'), configuration: 'runtime') testCompile project(':x-pack:plugin:ccr:qa') } diff --git a/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle b/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle index 5d0f7153a2c0..77d0a61c976d 100644 --- a/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle +++ b/x-pack/plugin/ccr/qa/non-compliant-license/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ccr'), configuration: 'runtime') testCompile project(':x-pack:plugin:ccr:qa:') } diff --git a/x-pack/plugin/ccr/qa/rest/build.gradle b/x-pack/plugin/ccr/qa/rest/build.gradle index d597aa38f372..8db29935a8d4 100644 --- a/x-pack/plugin/ccr/qa/rest/build.gradle +++ b/x-pack/plugin/ccr/qa/rest/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ccr'), configuration: 'runtime') } diff --git a/x-pack/plugin/ccr/qa/security/build.gradle b/x-pack/plugin/ccr/qa/security/build.gradle index 7b8b6178f265..a2f1235f590c 100644 --- a/x-pack/plugin/ccr/qa/security/build.gradle +++ b/x-pack/plugin/ccr/qa/security/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ccr'), configuration: 'runtime') testCompile project(':x-pack:plugin:ccr:qa') } diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 151b675fa108..5773dbebc941 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -51,11 +51,10 @@ dependencies { testCompile project(path: ':modules:analysis-common', configuration: 'runtime') testCompile project(":client:rest-high-level") - if (isEclipse == false || project.path == ":x-pack:plugin:core-tests") { - testCompile(project(':x-pack:license-tools')) { + testCompile(project(':x-pack:license-tools')) { transitive = false - } } + } ext.expansions = [ @@ -73,11 +72,7 @@ processResources { if (licenseKey != null) { println "Using provided license key from ${licenseKey}" } else if (snapshot) { - if (isEclipse) { - licenseKey = Paths.get(project.projectDir.path, '../../snapshot.key') - } else { licenseKey = Paths.get(project.projectDir.path, 'snapshot.key') - } } else { throw new IllegalArgumentException('Property license.key must be set for release build') } @@ -100,19 +95,6 @@ forbiddenApisMain { signaturesFiles += files('forbidden/hasher-signatures.txt') } -if (isEclipse) { - // in eclipse the project is under a fake root, we need to change around the source sets - sourceSets { - if (project.path == ":libs:elasticsearch-core") { - main.java.srcDirs = ['java'] - main.resources.srcDirs = ['resources'] - } else { - test.java.srcDirs = ['java'] - test.resources.srcDirs = ['resources'] - } - } -} - compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked" compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked" diff --git a/x-pack/plugin/core/src/main/eclipse-build.gradle b/x-pack/plugin/core/src/main/eclipse-build.gradle deleted file mode 100644 index 6bc7562f7fde..000000000000 --- a/x-pack/plugin/core/src/main/eclipse-build.gradle +++ /dev/null @@ -1,2 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' diff --git a/x-pack/plugin/core/src/test/eclipse-build.gradle b/x-pack/plugin/core/src/test/eclipse-build.gradle deleted file mode 100644 index ddec3a7fbd7d..000000000000 --- a/x-pack/plugin/core/src/test/eclipse-build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -// this is just shell gradle file for eclipse to have separate projects for core src and tests -apply from: '../../build.gradle' - -dependencies { - testCompile project(':x-pack:plugin:core') -} diff --git a/x-pack/plugin/frozen-indices/build.gradle b/x-pack/plugin/frozen-indices/build.gradle index dd69f6bd1682..a298802188f1 100644 --- a/x-pack/plugin/frozen-indices/build.gradle +++ b/x-pack/plugin/frozen-indices/build.gradle @@ -12,9 +12,6 @@ archivesBaseName = 'x-pack-frozen-indices' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // xpack modules are installed in real clusters as the meta plugin, so diff --git a/x-pack/plugin/graph/build.gradle b/x-pack/plugin/graph/build.gradle index a164189dd6a0..0b96516dd73e 100644 --- a/x-pack/plugin/graph/build.gradle +++ b/x-pack/plugin/graph/build.gradle @@ -12,9 +12,6 @@ archivesBaseName = 'x-pack-graph' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // add all sub-projects of the qa sub-project diff --git a/x-pack/plugin/ilm/build.gradle b/x-pack/plugin/ilm/build.gradle index 74c239414a39..7fec7486becb 100644 --- a/x-pack/plugin/ilm/build.gradle +++ b/x-pack/plugin/ilm/build.gradle @@ -15,9 +15,6 @@ archivesBaseName = 'x-pack-ilm' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // add all sub-projects of the qa sub-project diff --git a/x-pack/plugin/ilm/qa/rest/build.gradle b/x-pack/plugin/ilm/qa/rest/build.gradle index 8aaa6c70e3a0..865f51c52ca8 100644 --- a/x-pack/plugin/ilm/qa/rest/build.gradle +++ b/x-pack/plugin/ilm/qa/rest/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ilm'), configuration: 'runtime') } diff --git a/x-pack/plugin/logstash/build.gradle b/x-pack/plugin/logstash/build.gradle index 35699ba9b96a..aad286db95a9 100644 --- a/x-pack/plugin/logstash/build.gradle +++ b/x-pack/plugin/logstash/build.gradle @@ -12,9 +12,6 @@ archivesBaseName = 'x-pack-logstash' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.enabled = false diff --git a/x-pack/plugin/mapper-flattened/build.gradle b/x-pack/plugin/mapper-flattened/build.gradle index c9e1c408304e..c4dd270b0c4f 100644 --- a/x-pack/plugin/mapper-flattened/build.gradle +++ b/x-pack/plugin/mapper-flattened/build.gradle @@ -19,9 +19,6 @@ archivesBaseName = 'x-pack-flattened' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.enabled = false diff --git a/x-pack/plugin/ml/build.gradle b/x-pack/plugin/ml/build.gradle index c0f3d94b776e..1a826d4b868b 100644 --- a/x-pack/plugin/ml/build.gradle +++ b/x-pack/plugin/ml/build.gradle @@ -50,9 +50,6 @@ dependencies { compileOnly project(':modules:lang-painless:spi') compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } // This should not be here testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') diff --git a/x-pack/plugin/ml/qa/ml-with-security/build.gradle b/x-pack/plugin/ml/qa/ml-with-security/build.gradle index 8911a0dc2781..baf5570ce20a 100644 --- a/x-pack/plugin/ml/qa/ml-with-security/build.gradle +++ b/x-pack/plugin/ml/qa/ml-with-security/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackProject('plugin').path, configuration: 'testArtifacts') } diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle index 4c6c8b49fa63..69732625111d 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('ml'), configuration: 'runtime') testCompile project(path: xpackModule('ml'), configuration: 'testArtifacts') } diff --git a/x-pack/plugin/monitoring/build.gradle b/x-pack/plugin/monitoring/build.gradle index 0eb0089e237a..70a111cab0cf 100644 --- a/x-pack/plugin/monitoring/build.gradle +++ b/x-pack/plugin/monitoring/build.gradle @@ -12,9 +12,6 @@ archivesBaseName = 'x-pack-monitoring' dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } // monitoring deps compile project(':client:rest') diff --git a/x-pack/plugin/rollup/build.gradle b/x-pack/plugin/rollup/build.gradle index 39afbd434960..4650927ad871 100644 --- a/x-pack/plugin/rollup/build.gradle +++ b/x-pack/plugin/rollup/build.gradle @@ -18,9 +18,6 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.enabled = false diff --git a/x-pack/plugin/search-business-rules/build.gradle b/x-pack/plugin/search-business-rules/build.gradle index 5789ec5f0811..c0a289b0c4ed 100644 --- a/x-pack/plugin/search-business-rules/build.gradle +++ b/x-pack/plugin/search-business-rules/build.gradle @@ -27,10 +27,7 @@ check.dependsOn internalClusterTest dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - testCompile project(":test:framework") - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } + testCompile project(":test:framework") } // copied from CCR diff --git a/x-pack/plugin/security/build.gradle b/x-pack/plugin/security/build.gradle index c768b51a9c09..15f809a8872d 100644 --- a/x-pack/plugin/security/build.gradle +++ b/x-pack/plugin/security/build.gradle @@ -21,9 +21,6 @@ dependencies { testCompile project(path: xpackModule('sql:sql-action')) testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } compile 'com.unboundid:unboundid-ldapsdk:4.0.8' compileOnly 'org.bouncycastle:bcprov-jdk15on:1.59' diff --git a/x-pack/plugin/security/cli/build.gradle b/x-pack/plugin/security/cli/build.gradle index 0097adf30f51..af4f0ce7ed15 100644 --- a/x-pack/plugin/security/cli/build.gradle +++ b/x-pack/plugin/security/cli/build.gradle @@ -12,9 +12,6 @@ dependencies { testImplementation 'com.google.jimfs:jimfs:1.1' testCompile project(":test:framework") testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } dependencyLicenses { diff --git a/x-pack/plugin/security/qa/tls-basic/build.gradle b/x-pack/plugin/security/qa/tls-basic/build.gradle index f7bcadc1fccc..e10fe896a89b 100644 --- a/x-pack/plugin/security/qa/tls-basic/build.gradle +++ b/x-pack/plugin/security/qa/tls-basic/build.gradle @@ -6,9 +6,6 @@ dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } forbiddenPatterns { diff --git a/x-pack/plugin/spatial/build.gradle b/x-pack/plugin/spatial/build.gradle index 91bc2015195f..d6b6cd9f1268 100644 --- a/x-pack/plugin/spatial/build.gradle +++ b/x-pack/plugin/spatial/build.gradle @@ -12,9 +12,6 @@ esplugin { dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } licenseHeaders { diff --git a/x-pack/plugin/sql/build.gradle b/x-pack/plugin/sql/build.gradle index 116d5615855d..fc677b39158e 100644 --- a/x-pack/plugin/sql/build.gradle +++ b/x-pack/plugin/sql/build.gradle @@ -47,9 +47,6 @@ dependencies { compile "org.antlr:antlr4-runtime:4.5.3" testCompile project(':test:framework') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: ':modules:reindex', configuration: 'runtime') testCompile project(path: ':modules:parent-join', configuration: 'runtime') diff --git a/x-pack/plugin/sql/jdbc/build.gradle b/x-pack/plugin/sql/jdbc/build.gradle index 292b3ea890bf..fe85cb473e35 100644 --- a/x-pack/plugin/sql/jdbc/build.gradle +++ b/x-pack/plugin/sql/jdbc/build.gradle @@ -28,9 +28,6 @@ dependencies { runtime "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testCompile project(":test:framework") testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } dependencyLicenses { diff --git a/x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/StringUtils.java b/x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/StringUtils.java index 60b187567445..c558766e8854 100644 --- a/x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/StringUtils.java +++ b/x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/StringUtils.java @@ -75,7 +75,7 @@ public final class StringUtils { if (value == null) { return "null"; } - + if (value instanceof ZonedDateTime) { return ((ZonedDateTime) value).format(ISO_DATE_WITH_MILLIS); } diff --git a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java index f8bcff4ce529..a30a89addb81 100644 --- a/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java +++ b/x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java @@ -76,7 +76,7 @@ public class QuerierTests extends ESTestCase { boolean order = randomBoolean(); ordering[j] = order; Comparator comp = order ? Comparator.naturalOrder() : Comparator.reverseOrder(); - tuples.add(new Tuple<>(j, comp)); + tuples.add(new Tuple(j, comp)); } // Insert random no of documents (rows) with random 0/1 values for each field diff --git a/x-pack/plugin/transform/build.gradle b/x-pack/plugin/transform/build.gradle index a2d61617f82d..28824750480d 100644 --- a/x-pack/plugin/transform/build.gradle +++ b/x-pack/plugin/transform/build.gradle @@ -13,9 +13,6 @@ dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // xpack modules are installed in real clusters as the meta plugin, so diff --git a/x-pack/plugin/transform/qa/multi-node-tests/build.gradle b/x-pack/plugin/transform/qa/multi-node-tests/build.gradle index 8b93fd603d76..dbc799cd7707 100644 --- a/x-pack/plugin/transform/qa/multi-node-tests/build.gradle +++ b/x-pack/plugin/transform/qa/multi-node-tests/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('transform'), configuration: 'runtime') } diff --git a/x-pack/plugin/transform/qa/single-node-tests/build.gradle b/x-pack/plugin/transform/qa/single-node-tests/build.gradle index 034f8e160d25..953e133558d0 100644 --- a/x-pack/plugin/transform/qa/single-node-tests/build.gradle +++ b/x-pack/plugin/transform/qa/single-node-tests/build.gradle @@ -5,9 +5,6 @@ apply plugin: 'elasticsearch.rest-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('transform'), configuration: 'runtime') } diff --git a/x-pack/plugin/vectors/build.gradle b/x-pack/plugin/vectors/build.gradle index e780bd7f8a1a..96c8af48d49f 100644 --- a/x-pack/plugin/vectors/build.gradle +++ b/x-pack/plugin/vectors/build.gradle @@ -14,9 +14,6 @@ dependencies { compileOnly project(':modules:lang-painless:spi') compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.enabled = false diff --git a/x-pack/plugin/voting-only-node/build.gradle b/x-pack/plugin/voting-only-node/build.gradle index 1c79c665f2d0..4401201e4149 100644 --- a/x-pack/plugin/voting-only-node/build.gradle +++ b/x-pack/plugin/voting-only-node/build.gradle @@ -11,9 +11,6 @@ esplugin { dependencies { compileOnly project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } // xpack modules are installed in real clusters as the meta plugin, so diff --git a/x-pack/plugin/watcher/build.gradle b/x-pack/plugin/watcher/build.gradle index 6bb4c495d73b..0ba3f721196d 100644 --- a/x-pack/plugin/watcher/build.gradle +++ b/x-pack/plugin/watcher/build.gradle @@ -29,9 +29,6 @@ dependencies { compileOnly project(path: ':plugins:transport-nio', configuration: 'runtime') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(xpackModule('ilm')) // watcher deps diff --git a/x-pack/qa/evil-tests/build.gradle b/x-pack/qa/evil-tests/build.gradle index bbb1c5804086..d411909fb310 100644 --- a/x-pack/qa/evil-tests/build.gradle +++ b/x-pack/qa/evil-tests/build.gradle @@ -2,9 +2,6 @@ apply plugin: 'elasticsearch.standalone-test' dependencies { testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') } diff --git a/x-pack/qa/kerberos-tests/build.gradle b/x-pack/qa/kerberos-tests/build.gradle index 10aae750dd2c..3b6530a69d8f 100644 --- a/x-pack/qa/kerberos-tests/build.gradle +++ b/x-pack/qa/kerberos-tests/build.gradle @@ -11,9 +11,6 @@ testFixtures.useFixture ":test:fixtures:krb5kdc-fixture", "peppa" dependencies { testCompile project(':x-pack:plugin:core') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') } diff --git a/x-pack/qa/oidc-op-tests/build.gradle b/x-pack/qa/oidc-op-tests/build.gradle index 292a1c3ee0c9..ebd5547f61fb 100644 --- a/x-pack/qa/oidc-op-tests/build.gradle +++ b/x-pack/qa/oidc-op-tests/build.gradle @@ -8,9 +8,6 @@ apply plugin: 'elasticsearch.test.fixtures' dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') } testFixtures.useFixture ":x-pack:test:idp-fixture", "oidc-provider" diff --git a/x-pack/qa/openldap-tests/build.gradle b/x-pack/qa/openldap-tests/build.gradle index f32b64e3ec0a..805023b54136 100644 --- a/x-pack/qa/openldap-tests/build.gradle +++ b/x-pack/qa/openldap-tests/build.gradle @@ -5,9 +5,6 @@ dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } testFixtures.useFixture ":x-pack:test:idp-fixture", "openldap" diff --git a/x-pack/qa/reindex-tests-with-security/build.gradle b/x-pack/qa/reindex-tests-with-security/build.gradle index 658dffe54a8c..0a81e29088fd 100644 --- a/x-pack/qa/reindex-tests-with-security/build.gradle +++ b/x-pack/qa/reindex-tests-with-security/build.gradle @@ -6,9 +6,6 @@ dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('security'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } testCompile project(path: ':modules:reindex') } diff --git a/x-pack/qa/security-setup-password-tests/build.gradle b/x-pack/qa/security-setup-password-tests/build.gradle index 291c0abd3fa0..afa3c95ae90e 100644 --- a/x-pack/qa/security-setup-password-tests/build.gradle +++ b/x-pack/qa/security-setup-password-tests/build.gradle @@ -6,9 +6,6 @@ dependencies { testCompile project(path: xpackModule('core'), configuration: 'default') testCompile project(path: xpackModule('security'), configuration: 'runtime') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') - if (isEclipse) { - testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts') - } } integTest.runner {