Browse Source

Remove eclipse conditionals (#44075)

* Remove eclipse conditionals

We used to have some meta projects with a `-test` prefix because
historically eclipse could not distinguish between test and main
source-sets and could only use a single classpath.
This is no longer the case for the past few Eclipse versions.

This PR adds the necessary configuration to correctly categorize source
folders and libraries.
With this change eclipse can import projects, and the visibility rules
are correct e.x. auto compete doesn't offer classes from test code or
`testCompile` dependencies when editing classes in `main`.

Unfortunately the cyclic dependency detection in Eclipse doesn't seem to
take the difference between test and non test source sets into account,
but since we are checking this in Gradle anyhow, it's safe to set to
`warning` in the settings. Unfortunately there is no setting to ignore
it.

This might cause problems when building since Eclipse will probably not
know the right order to build things in so more wirk might be necesarry.
Alpar Torok 6 years ago
parent
commit
ca54b442bf
82 changed files with 401 additions and 511 deletions
  1. 7 8
      CONTRIBUTING.md
  2. 3 13
      build.gradle
  3. 2 0
      buildSrc/src/main/resources/eclipse.settings/org.eclipse.jdt.core.prefs
  4. 2 17
      client/rest-high-level/build.gradle
  5. 0 2
      client/rest-high-level/src/main/eclipse-build.gradle
  6. 0 6
      client/rest-high-level/src/test/eclipse-build.gradle
  7. 0 1
      libs/build.gradle
  8. 340 0
      libs/core/.classpath1
  9. 2 17
      libs/core/build.gradle
  10. 0 2
      libs/core/src/main/eclipse-build.gradle
  11. 7 2
      libs/core/src/main/java/org/elasticsearch/bootstrap/JarHell.java
  12. 0 6
      libs/core/src/test/eclipse-build.gradle
  13. 2 16
      libs/dissect/build.gradle
  14. 0 3
      libs/dissect/src/main/eclipse-build.gradle
  15. 0 7
      libs/dissect/src/test/eclipse-build.gradle
  16. 2 16
      libs/geo/build.gradle
  17. 0 3
      libs/geo/src/main/eclipse-build.gradle
  18. 0 6
      libs/geo/src/test/eclipse-build.gradle
  19. 2 17
      libs/grok/build.gradle
  20. 0 3
      libs/grok/src/main/eclipse-build.gradle
  21. 0 7
      libs/grok/src/test/eclipse-build.gradle
  22. 2 16
      libs/nio/build.gradle
  23. 0 3
      libs/nio/src/main/eclipse-build.gradle
  24. 0 7
      libs/nio/src/test/eclipse-build.gradle
  25. 3 18
      libs/secure-sm/build.gradle
  26. 0 3
      libs/secure-sm/src/main/eclipse-build.gradle
  27. 0 7
      libs/secure-sm/src/test/eclipse-build.gradle
  28. 2 16
      libs/ssl-config/build.gradle
  29. 0 2
      libs/ssl-config/src/main/eclipse-build.gradle
  30. 0 5
      libs/ssl-config/src/test/eclipse-build.gradle
  31. 2 17
      libs/x-content/build.gradle
  32. 0 3
      libs/x-content/src/main/eclipse-build.gradle
  33. 0 7
      libs/x-content/src/test/eclipse-build.gradle
  34. 3 1
      plugins/repository-hdfs/build.gradle
  35. 14 28
      server/build.gradle
  36. 0 3
      server/src/main/eclipse-build.gradle
  37. 0 7
      server/src/test/eclipse-build.gradle
  38. 1 68
      settings.gradle
  39. 0 3
      x-pack/docs/build.gradle
  40. 0 3
      x-pack/plugin/analytics/build.gradle
  41. 0 3
      x-pack/plugin/build.gradle
  42. 0 3
      x-pack/plugin/ccr/build.gradle
  43. 0 3
      x-pack/plugin/ccr/qa/downgrade-to-basic-license/build.gradle
  44. 0 3
      x-pack/plugin/ccr/qa/multi-cluster/build.gradle
  45. 0 3
      x-pack/plugin/ccr/qa/non-compliant-license/build.gradle
  46. 0 3
      x-pack/plugin/ccr/qa/rest/build.gradle
  47. 0 3
      x-pack/plugin/ccr/qa/security/build.gradle
  48. 2 20
      x-pack/plugin/core/build.gradle
  49. 0 2
      x-pack/plugin/core/src/main/eclipse-build.gradle
  50. 0 6
      x-pack/plugin/core/src/test/eclipse-build.gradle
  51. 0 3
      x-pack/plugin/frozen-indices/build.gradle
  52. 0 3
      x-pack/plugin/graph/build.gradle
  53. 0 3
      x-pack/plugin/ilm/build.gradle
  54. 0 3
      x-pack/plugin/ilm/qa/rest/build.gradle
  55. 0 3
      x-pack/plugin/logstash/build.gradle
  56. 0 3
      x-pack/plugin/mapper-flattened/build.gradle
  57. 0 3
      x-pack/plugin/ml/build.gradle
  58. 0 3
      x-pack/plugin/ml/qa/ml-with-security/build.gradle
  59. 0 3
      x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle
  60. 0 3
      x-pack/plugin/monitoring/build.gradle
  61. 0 3
      x-pack/plugin/rollup/build.gradle
  62. 1 4
      x-pack/plugin/search-business-rules/build.gradle
  63. 0 3
      x-pack/plugin/security/build.gradle
  64. 0 3
      x-pack/plugin/security/cli/build.gradle
  65. 0 3
      x-pack/plugin/security/qa/tls-basic/build.gradle
  66. 0 3
      x-pack/plugin/spatial/build.gradle
  67. 0 3
      x-pack/plugin/sql/build.gradle
  68. 0 3
      x-pack/plugin/sql/jdbc/build.gradle
  69. 1 1
      x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/StringUtils.java
  70. 1 1
      x-pack/plugin/sql/src/test/java/org/elasticsearch/xpack/sql/execution/search/QuerierTests.java
  71. 0 3
      x-pack/plugin/transform/build.gradle
  72. 0 3
      x-pack/plugin/transform/qa/multi-node-tests/build.gradle
  73. 0 3
      x-pack/plugin/transform/qa/single-node-tests/build.gradle
  74. 0 3
      x-pack/plugin/vectors/build.gradle
  75. 0 3
      x-pack/plugin/voting-only-node/build.gradle
  76. 0 3
      x-pack/plugin/watcher/build.gradle
  77. 0 3
      x-pack/qa/evil-tests/build.gradle
  78. 0 3
      x-pack/qa/kerberos-tests/build.gradle
  79. 0 3
      x-pack/qa/oidc-op-tests/build.gradle
  80. 0 3
      x-pack/qa/openldap-tests/build.gradle
  81. 0 3
      x-pack/qa/reindex-tests-with-security/build.gradle
  82. 0 3
      x-pack/qa/security-setup-password-tests/build.gradle

+ 7 - 8
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

+ 3 - 13
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(':', '_')
   }

+ 2 - 0
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

+ 2 - 17
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")

+ 0 - 2
client/rest-high-level/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 6
client/rest-high-level/src/test/eclipse-build.gradle

@@ -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')
-}

+ 0 - 1
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 "

+ 340 - 0
libs/core/.classpath1

@@ -0,0 +1,340 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="output" path="build-eclipse"/>
+	<classpathentry output="build-eclipse/1" kind="src" path="src/main/java">
+		<attributes>
+			<attribute name="gradle_scope" value="main"/>
+			<attribute name="gradle_used_by_scope" value="main,test"/>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry output="build-eclipse/2" kind="src" path="src/main/resources">
+		<attributes>
+			<attribute name="gradle_scope" value="main"/>
+			<attribute name="gradle_used_by_scope" value="main,test"/>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry output="build-eclipse/3" kind="src" path="src/test/java">
+		<attributes>
+			<attribute name="gradle_scope" value="test"/>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry output="build-eclipse/4" kind="src" path="src/test/resources">
+		<attributes>
+			<attribute name="gradle_scope" value="test"/>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:test:framework">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:client:sniffer">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:client:rest">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:libs:elasticsearch-nio">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:server">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:libs:elasticsearch-cli">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:libs:elasticsearch-x-content">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:libs:elasticsearch-secure-sm">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" path="/:libs:elasticsearch-geo">
+		<attributes>
+			<attribute name="test" value="false"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.carrotsearch.randomizedtesting/randomizedtesting-runner/2.7.1/297eb65573826548c173ab16d60ad9ef4435aa5a/randomizedtesting-runner-2.7.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.carrotsearch.randomizedtesting/randomizedtesting-runner/2.7.1/e917f4983144c3b969eb7d3648338ecde5e3ba89/randomizedtesting-runner-2.7.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa/junit-4.12-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.1/aa6763235632b77fd9245c850b6a7dc09382314c/hamcrest-2.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest/2.1/9420ba32c29217b54eebd26ff7f9234d31c3fbb2/hamcrest-2.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-test-framework/8.1.0/4ec336c2635c081b2ae9d20272cccc982252e98c/lucene-test-framework-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-test-framework/8.1.0/bb9d9070244b7d106181a147e95f7d94c77afadb/lucene-test-framework-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-codecs/8.1.0/ec5ab52608df537349586189ba8c97d01a912118/lucene-codecs-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-codecs/8.1.0/9a742c73188a7994cbbb09bde5cb4f9b350e41be/lucene-codecs-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/28bb0405fddaf04f15058fbfbe01fe2780d7d3b6/commons-logging-1.1.3-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.1.3/f6f66e966c70a83ffbdb6f17a0919eaf7c8aca7f/commons-logging-1.1.3.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.11/bce4ba84fd527950e35040b20a991c63e90e2850/commons-codec-1.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.11/3acb4705652e16236558f0f4f2192cc33c3bd189/commons-codec-1.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.elasticsearch/securemock/1.2/98201d4ad5ac93f6b415ae9172d52b5e7cda490e/securemock-1.2.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.elasticsearch/mocksocket/1.2/5a7e4e48580119231e834b5d77333248275e3fb7/mocksocket-1.2-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.elasticsearch/mocksocket/1.2/190ad3f42fd6ab7367bae0c0e14d1dc4e4a3c361/mocksocket-1.2.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.8/585883960a4ff782ba1982a08649307c6cb2227b/httpclient-4.5.8-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.8/c27c9d6f15435dc2b6947112027b418b0eef32b9/httpclient-4.5.8.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.11/95167d269607b358ba3ed7030ccd336dad8591a0/httpcore-4.4.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.11/de748cf874e4e193b42eceea9fe5574fabb9d4df/httpcore-4.4.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.4/1e5c5d894e85baa50550e9cb8d8ddc112fbea178/httpasyncclient-4.1.4-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpasyncclient/4.1.4/f3a3240681faae3fa46b573a4c7e50cec9db0d86/httpasyncclient-4.1.4.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore-nio/4.4.11/facca262030911feca8e213b75fa94be9d2731fa/httpcore-nio-4.4.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore-nio/4.4.11/7d0a97d01d39cff9aa3e6db81f21fddb2435f4e6/httpcore-nio-4.4.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.11/1e1df4d8c9ca05f1708e0ce1d842cf82931a7fc9/jackson-core-2.8.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.8.11/876ead1db19f0c9e79c9789273a3ef8c6fd6c29b/jackson-core-2.8.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-core/8.1.0/e26c61713c758c300db821f68a0dc2818b13b636/lucene-core-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-core/8.1.0/46d614acdeb42f4661e91347100217bc72aae11e/lucene-core-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-analyzers-common/8.1.0/3ccfd3da682201c5520c7dae84d43e7c945ece5/lucene-analyzers-common-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-analyzers-common/8.1.0/262f20cb2786cdf7015a4ba1a64ce90ff2d746f5/lucene-analyzers-common-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-backward-codecs/8.1.0/47a45d69c48695985cb70beec726b0ed9be32fc2/lucene-backward-codecs-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-backward-codecs/8.1.0/c5610306f8eff182b399b9aed7a60b82668a8395/lucene-backward-codecs-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-grouping/8.1.0/b664053986c60f79d26d8a43b64987408cd4155a/lucene-grouping-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-grouping/8.1.0/443f63d9038eea0601b493fa37fc599d74b035eb/lucene-grouping-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-highlighter/8.1.0/d1a65950da98344faff041a9dbc7e9551af3fe2d/lucene-highlighter-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-highlighter/8.1.0/e3e52591f8d44a4e1006ced4dd4a67f7a572990a/lucene-highlighter-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-join/8.1.0/eea7b9f1d15055690ad51c8b43cf17dd9c66ed24/lucene-join-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-join/8.1.0/2e885b1e3e55f94ccc2744f85738563a577a4e21/lucene-join-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-memory/8.1.0/1617393f4a514173e3471a36d4f4218f082a69c7/lucene-memory-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-memory/8.1.0/e58d0092da1c4744627d57d022f4e07d8b80d11b/lucene-memory-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-misc/8.1.0/ce94419defc599c60230600ec2d2b4bb76671e0b/lucene-misc-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-misc/8.1.0/7833aee2c5feb6fa1a16a21d27c8f15c01d0b4c/lucene-misc-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-queries/8.1.0/b99490a0e8ecd2f331cc6f9885d59bdca6308d8c/lucene-queries-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-queries/8.1.0/63096d40298b8b8245a602d344b57bfa14b929fd/lucene-queries-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-queryparser/8.1.0/1ba57113f4f540ab7f47413e6ddb1e288cbc5aac/lucene-queryparser-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-queryparser/8.1.0/9bb4fb3c7035a877e4a87ed86870894509d26d65/lucene-queryparser-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-sandbox/8.1.0/d1a2b54748a67698653c46afd84da83bcd5f094c/lucene-sandbox-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-sandbox/8.1.0/1033737c97703516134ba4c99d41724729854df4/lucene-sandbox-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial/8.1.0/9d42f5cc4d22d50659a1d6f3c27d2d879bf9926e/lucene-spatial-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial/8.1.0/968d2fb35b0c2e68ac07c1ec187ab38a74b6602a/lucene-spatial-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial-extras/8.1.0/da7fef60614682a65acabe2f2fa5ac97cf0cc8ab/lucene-spatial-extras-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial-extras/8.1.0/551b7fa327645d3fd59ae1321320153b2f858766/lucene-spatial-extras-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial3d/8.1.0/7d56ff0f468a3cb5c916e1e4b67eb6e9b5e0910e/lucene-spatial3d-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-spatial3d/8.1.0/45e63df708be458e95d9da3e6054189c50c30dff/lucene-spatial3d-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-suggest/8.1.0/ca528bbcf559dd9b5afc5fb20c95b20fd6c437f9/lucene-suggest-8.1.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.lucene/lucene-suggest/8.1.0/d5cd0e619b473e132f03e3577d1b422f050f99c0/lucene-suggest-8.1.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.carrotsearch/hppc/0.8.1/b338e50c3f98c7ec2bf67a5efb7fa8726a4a9b2d/hppc-0.8.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.carrotsearch/hppc/0.8.1/ffc7ba8f289428b9508ab484b8001dea944ae603/hppc-0.8.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.10.2/fbf6cbd712c30629c77cefa42fe15ca888e609d5/joda-time-2.10.2-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/joda-time/joda-time/2.10.2/a079fc39ccc3de02acdeb7117443e5d9bd431687/joda-time-2.10.2.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.tdunning/t-digest/3.2/b1858d66a80a93f61f048cf542fc2751ec7971bf/t-digest-3.2-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.tdunning/t-digest/3.2/2ab94758b0276a8a26102adf8d528cf6d0567b9a/t-digest-3.2.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.hdrhistogram/HdrHistogram/2.1.9/966a6429061192e62cc346462587253a726db6b7/HdrHistogram-2.1.9-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.hdrhistogram/HdrHistogram/2.1.9/e4631ce165eb400edecfa32e03d3f1be53dee754/HdrHistogram-2.1.9.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.locationtech.spatial4j/spatial4j/0.7/a5ce80e5742f35c523f64963a3786cd4a3ca9fd7/spatial4j-0.7-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.locationtech.spatial4j/spatial4j/0.7/faa8ba85d503da4ab872d17ba8c00da0098ab2f2/spatial4j-0.7.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.locationtech.jts/jts-core/1.15.0/85f9b98dfa591c1cee8d3d4fe5a2bf68667adf83/jts-core-1.15.0-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.locationtech.jts/jts-core/1.15.0/705981b7e25d05a76a3654e597dab6ba423eb79e/jts-core-1.15.0.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.11.1/acf35297ef03716fc14e11e2978d7c749ed3f7e5/log4j-api-2.11.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.11.1/268f0fe4df3eefe052b57c87ec48517d64fb2a10/log4j-api-2.11.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.11.1/23bef4ea0494ba9fb9835df0e3e23c6883d8d545/log4j-core-2.11.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.11.1/592a48674c926b01a9a747c7831bcd82a9e6d6e4/log4j-core-2.11.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.elasticsearch/jna/4.5.1/965bf0f4cf5b71c2b1e9bb5a8d7b6919020e0492/jna-4.5.1-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.elasticsearch/jna/4.5.1/da10908ae23dc59b19dc258e63aea1c44621dc3a/jna-4.5.1.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/5.0.2/8c1ab37cb37a04678788316d6c560078bc56d885/jopt-simple-5.0.2-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/5.0.2/98cafc6081d5632b61be2c9e60650b64ddbc637c/jopt-simple-5.0.2.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.17/63577e87886c76228db9f8a2c50ea43cde5072eb/snakeyaml-1.17-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.17/7a27ea250c5130b2922b86dea63cbb1cc10a660c/snakeyaml-1.17.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-smile/2.8.11/c95012df5b920dec8aaa1e72da686ec9f604e55c/jackson-dataformat-smile-2.8.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-smile/2.8.11/d9d1c49c5d9d5e46e2aee55f3cdd119286fe0fc1/jackson-dataformat-smile-2.8.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.8.11/1bb966044d716dc7d98e4af8191e0fcee227b116/jackson-dataformat-yaml-2.8.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-yaml/2.8.11/2e77c6ff7342cd61ab1ae7cb14ed16aebfc8a72a/jackson-dataformat-yaml-2.8.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry sourcepath="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.8.11/184006c18ca44a79e9bcde99738b176dfea939f/jackson-dataformat-cbor-2.8.11-sources.jar" kind="lib" path="/home/alpar/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.dataformat/jackson-dataformat-cbor/2.8.11/8b9826e16c3366764bfb7ad7362554f0471046c3/jackson-dataformat-cbor-2.8.11.jar">
+		<attributes>
+			<attribute name="gradle_used_by_scope" value="test"/>
+			<attribute name="test" value="true"/>
+		</attributes>
+	</classpathentry>
+</classpath>

+ 2 - 17
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',

+ 0 - 2
libs/core/src/main/eclipse-build.gradle

@@ -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'

+ 7 - 2
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);
                 }

+ 0 - 6
libs/core/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 16
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']
-        }
-    }
-}

+ 0 - 3
libs/dissect/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
libs/dissect/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 16
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']
-        }
-    }
-}

+ 0 - 3
libs/geo/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 6
libs/geo/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 17
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',

+ 0 - 3
libs/grok/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
libs/grok/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 16
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

+ 0 - 3
libs/nio/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
libs/nio/src/test/eclipse-build.gradle

@@ -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')
-}

+ 3 - 18
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
 

+ 0 - 3
libs/secure-sm/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
libs/secure-sm/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 16
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'

+ 0 - 2
libs/ssl-config/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 5
libs/ssl-config/src/test/eclipse-build.gradle

@@ -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')
-}

+ 2 - 17
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',

+ 0 - 3
libs/x-content/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
libs/x-content/src/test/eclipse-build.gradle

@@ -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')
-}

+ 3 - 1
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 {

+ 14 - 28
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
+
+   include '**/*IT.class'
+}
 
-  check.dependsOn integTest
+check.dependsOn integTest
 
-  task internalClusterTest {
-     dependsOn integTest    
-  }
+task internalClusterTest {
+   dependsOn integTest
 }
 
+

+ 0 - 3
server/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 7
server/src/test/eclipse-build.gradle

@@ -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')
-}

+ 1 - 68
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()) {

+ 0 - 3
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')
 }
 

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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')
 }
 

+ 0 - 3
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')
 }

+ 0 - 3
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')
 }

+ 0 - 3
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:')
 }

+ 0 - 3
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')
 }
 

+ 0 - 3
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')
 }

+ 2 - 20
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"
 

+ 0 - 2
x-pack/plugin/core/src/main/eclipse-build.gradle

@@ -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'

+ 0 - 6
x-pack/plugin/core/src/test/eclipse-build.gradle

@@ -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')
-}

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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')
 }
 

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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')
 

+ 0 - 3
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')
 }
 

+ 0 - 3
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')
 }

+ 0 - 3
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')

+ 0 - 3
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

+ 1 - 4
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

+ 0 - 3
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'

+ 0 - 3
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 {

+ 0 - 3
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 {

+ 0 - 3
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 {

+ 0 - 3
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')

+ 0 - 3
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 {

+ 1 - 1
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);
         }

+ 1 - 1
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<Integer, Comparator>(j, comp));
         }
 
         // Insert random no of documents (rows) with random 0/1 values for each field

+ 0 - 3
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

+ 0 - 3
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')
 }
 

+ 0 - 3
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')
 }
 

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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

+ 0 - 3
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')
 }
 

+ 0 - 3
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')
 }
 

+ 0 - 3
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"

+ 0 - 3
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"

+ 0 - 3
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')
 }
 

+ 0 - 3
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 {