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.
This commit is contained in:
Alpar Torok 2019-10-03 10:50:46 +03:00
parent d55378e8e7
commit 0a14bb174f
45 changed files with 404 additions and 368 deletions

View File

@ -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 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. 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 We support development in the Eclipse and IntelliJ IDEs.
minimum version that we support is [Eclipse Oxygen][eclipse] (version 4.7). For For Eclipse, the minimum version that we support is [4.13][eclipse].
IntelliJ, the minimum version that we support is [IntelliJ 2017.2][intellij]. For IntelliJ, the minimum version that we support is [IntelliJ 2017.2][intellij].
### Configuring IDEs And Running Tests ### Configuring IDEs And Running Tests
Eclipse users can automatically configure their IDE: `./gradlew eclipse` Eclipse users can automatically configure their IDE: `./gradlew eclipse`
then `File: Import: Existing Projects into Workspace`. Select the then `File: Import: Gradle : Existing Gradle Project`.
option `Search for nested projects`. Additionally you will want to Additionally you will want to ensure that Eclipse is using 2048m of heap by modifying
ensure that Eclipse is using 2048m of heap by modifying `eclipse.ini` `eclipse.ini` accordingly to avoid GC overhead and OOM errors.
accordingly to avoid GC overhead errors.
IntelliJ users can automatically configure their IDE: `./gradlew idea` IntelliJ users can automatically configure their IDE: `./gradlew idea`
then `File->New Project From Existing Sources`. Point to the root of then `File->New Project From Existing Sources`. Point to the root of
@ -438,6 +437,6 @@ Finally, we require that you run `./gradlew check` before submitting a
non-documentation contribution. This is mentioned above, but it is worth non-documentation contribution. This is mentioned above, but it is worth
repeating in this section because it has come up in this context. 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/ [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 [shadow-plugin]: https://github.com/johnrengelman/shadow

View File

@ -384,29 +384,19 @@ allprojects {
} }
plugins.withType(JavaBasePlugin) { plugins.withType(JavaBasePlugin) {
File eclipseBuild = project.file('build-eclipse') eclipse.classpath.defaultOutputDir = 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.file.whenMerged { classpath -> eclipse.classpath.file.whenMerged { classpath ->
// give each source folder a unique corresponding output folder // give each source folder a unique corresponding output folder
int i = 0; int i = 0;
classpath.entries.findAll { it instanceof SourceFolder }.each { folder -> classpath.entries.findAll { it instanceof SourceFolder }.each { folder ->
i++; i++;
// this is *NOT* a path or a file.
folder.output = "build-eclipse/" + i folder.output = "build-eclipse/" + i
} }
} }
} }
File licenseHeaderFile; File licenseHeaderFile
String prefix = ':x-pack'; String prefix = ':x-pack'
if (Os.isFamily(Os.FAMILY_WINDOWS)) { if (Os.isFamily(Os.FAMILY_WINDOWS)) {
prefix = prefix.replace(':', '_') prefix = prefix.replace(':', '_')
} }

View File

@ -15,6 +15,8 @@ eclipse.preferences.version=1
# org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning # org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
# org.eclipse.jdt.core.compiler.problem.potentialNullReference=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.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.formatter.comment.line_length=140 org.eclipse.jdt.core.formatter.comment.line_length=140
org.eclipse.jdt.core.formatter.lineSplit=140 org.eclipse.jdt.core.formatter.lineSplit=140

View File

@ -67,7 +67,9 @@ dependencies {
testCompile project(":rest-api-spec") testCompile project(":rest-api-spec")
// Needed for serialization tests: // Needed for serialization tests:
// (In order to serialize a server side class to a client side class or the other way around) // (In order to serialize a server side class to a client side class or the other way around)
testCompile project(':x-pack:plugin:core') testCompile(project(':x-pack:plugin:core')) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-rest-high-level-client'
}
restSpec project(':rest-api-spec') restSpec project(':rest-api-spec')
} }
@ -95,6 +97,7 @@ forbiddenApisMain {
addSignatureFiles 'http-signatures' addSignatureFiles 'http-signatures'
signaturesFiles += files('src/main/resources/forbidden/rest-high-level-signatures.txt') signaturesFiles += files('src/main/resources/forbidden/rest-high-level-signatures.txt')
} }
File nodeCert = file("./testnode.crt") File nodeCert = file("./testnode.crt")
File nodeTrustStore = file("./testnode.jks") File nodeTrustStore = file("./testnode.jks")
File pkiTrustCert = file("./src/test/resources/org/elasticsearch/client/security/delegate_pki/testRootCA.crt") File pkiTrustCert = file("./src/test/resources/org/elasticsearch/client/security/delegate_pki/testRootCA.crt")

View File

@ -34,7 +34,6 @@ subprojects {
Project depProject = dep.dependencyProject Project depProject = dep.dependencyProject
if (depProject != null if (depProject != null
&& false == depProject.path.equals(':libs:elasticsearch-core') && false == depProject.path.equals(':libs:elasticsearch-core')
&& false == isEclipse
&& depProject.path.startsWith(':libs')) { && depProject.path.startsWith(':libs')) {
throw new InvalidUserDataException("projects in :libs " throw new InvalidUserDataException("projects in :libs "
+ "may not depend on other projects libs except " + "may not depend on other projects libs except "

340
libs/core/.classpath1 Normal file
View File

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

View File

@ -84,12 +84,10 @@ dependencies {
java9Compile sourceSets.main.output java9Compile sourceSets.main.output
} }
if (isEclipse == false || project.path == ":libs:core-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-core' exclude group: 'org.elasticsearch', module: 'elasticsearch-core'
} }
} }
}
forbiddenApisMain { forbiddenApisMain {
// :libs:elasticsearch-core does not depend on server // :libs:elasticsearch-core does not depend on server
@ -97,19 +95,6 @@ forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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 ( thirdPartyAudit.ignoreMissingClasses (
// from log4j // from log4j
'org/osgi/framework/AdaptPermission', 'org/osgi/framework/AdaptPermission',

View File

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

View File

@ -134,8 +134,13 @@ public class JarHell {
} }
// now just parse as ordinary file // now just parse as ordinary file
try { try {
if (element .equals("/")) {
// Eclipse adds this to the classpath when running unit tests...
continue;
}
URL url = PathUtils.get(element).toUri().toURL(); URL url = PathUtils.get(element).toUri().toURL();
if (urlElements.add(url) == false) { // junit4.childvm.count
if (urlElements.add(url) == false && element.endsWith(".jar")) {
throw new IllegalStateException("jar hell!" + System.lineSeparator() + throw new IllegalStateException("jar hell!" + System.lineSeparator() +
"duplicate jar [" + element + "] on classpath: " + classPath); "duplicate jar [" + element + "] on classpath: " + classPath);
} }

View File

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

View File

@ -18,11 +18,9 @@
*/ */
dependencies { dependencies {
if (isEclipse == false || project.path == ":libs:elasticsearch-dissect-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect' exclude group: 'org.elasticsearch', module: 'elasticsearch-dissect'
} }
}
testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}" testCompile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}" testCompile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
testCompile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}" testCompile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
@ -32,15 +30,3 @@ forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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']
}
}
}

View File

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

View File

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

View File

@ -22,12 +22,10 @@ apply plugin: 'nebula.maven-base-publish'
apply plugin: 'nebula.maven-scm' apply plugin: 'nebula.maven-scm'
dependencies { dependencies {
if (isEclipse == false || project.path == ":libs:elasticsearch-geo-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-geo' exclude group: 'org.elasticsearch', module: 'elasticsearch-geo'
} }
} }
}
forbiddenApisMain { forbiddenApisMain {
// geo does not depend on server // geo does not depend on server
@ -35,15 +33,3 @@ forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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']
}
}
}

View File

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

View File

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

View File

@ -22,30 +22,15 @@ dependencies {
// joni dependencies: // joni dependencies:
compile 'org.jruby.jcodings:jcodings:1.0.44' compile 'org.jruby.jcodings:jcodings:1.0.44'
if (isEclipse == false || project.path == ":libs:elasticsearch-grok-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-grok' exclude group: 'org.elasticsearch', module: 'elasticsearch-grok'
} }
} }
}
forbiddenApisMain { forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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 ( thirdPartyAudit.ignoreMissingClasses (
// joni has AsmCompilerSupport, but that isn't being used: // joni has AsmCompilerSupport, but that isn't being used:
'org.objectweb.asm.ClassWriter', 'org.objectweb.asm.ClassWriter',

View File

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

View File

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

View File

@ -26,25 +26,11 @@ dependencies {
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:elasticsearch-nio-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-nio' 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 { forbiddenApisMain {
// nio does not depend on core, so only jdk signatures should be checked // nio does not depend on core, so only jdk signatures should be checked

View File

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

View File

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

View File

@ -26,30 +26,15 @@ dependencies {
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:elasticsearch-secure-sm-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm' exclude group: 'org.elasticsearch', module: 'elasticsearch-secure-sm'
} }
} }
}
forbiddenApisMain { forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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 // JAR hell is part of core which we do not want to add as a dependency
jarHell.enabled = false jarHell.enabled = false

View File

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

View File

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

View File

@ -21,29 +21,15 @@ apply plugin: "nebula.maven-scm"
dependencies { dependencies {
compile project(':libs:elasticsearch-core') compile project(':libs:elasticsearch-core')
if (isEclipse == false || project.path == ":libs:elasticsearch-ssl-config-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config' exclude group: 'org.elasticsearch', module: 'elasticsearch-ssl-config'
} }
}
testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}" testCompile "com.carrotsearch.randomizedtesting:randomizedtesting-runner:${versions.randomizedrunner}"
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" 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 { forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' replaceSignatureFiles 'jdk-signatures'

View File

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

View File

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

View File

@ -34,11 +34,9 @@ dependencies {
testCompile "junit:junit:${versions.junit}" testCompile "junit:junit:${versions.junit}"
testCompile "org.hamcrest:hamcrest:${versions.hamcrest}" testCompile "org.hamcrest:hamcrest:${versions.hamcrest}"
if (isEclipse == false || project.path == ":libs:elasticsearch-x-content-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content' exclude group: 'org.elasticsearch', module: 'elasticsearch-x-content'
} }
}
} }
@ -48,19 +46,6 @@ forbiddenApisMain {
replaceSignatureFiles 'jdk-signatures' 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 ( thirdPartyAudit.ignoreMissingClasses (
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml) // from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
'com.fasterxml.jackson.databind.ObjectMapper', 'com.fasterxml.jackson.databind.ObjectMapper',

View File

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

View File

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

View File

@ -68,8 +68,10 @@ dependencies {
hdfsFixture project(':test:fixtures:hdfs-fixture') 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 // Set the keytab files in the classpath so that we can access them from test code without the security manager
// freaking out. // freaking out.
if (isEclipse == false) {
testRuntime files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs","hdfs_hdfs.build.elastic.co.keytab").parent) testRuntime files(project(':test:fixtures:krb5kdc-fixture').ext.krb5Keytabs("hdfs","hdfs_hdfs.build.elastic.co.keytab").parent)
} }
}
normalization { normalization {
runtimeClasspath { runtimeClasspath {

View File

@ -126,29 +126,15 @@ dependencies {
java9Compile sourceSets.main.output java9Compile sourceSets.main.output
} }
if (isEclipse == false || project.path == ":server-tests") {
testCompile(project(":test:framework")) { testCompile(project(":test:framework")) {
// tests use the locally compiled version of server // tests use the locally compiled version of server
exclude group: 'org.elasticsearch', module: 'server' exclude group: 'org.elasticsearch', module: 'server'
} }
}
testCompile 'com.google.jimfs:jimfs:1.1' testCompile 'com.google.jimfs:jimfs:1.1'
testCompile 'com.google.guava:guava:18.0' testCompile 'com.google.guava:guava:18.0'
} }
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" compileJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked"
compileTestJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked" compileTestJava.options.compilerArgs << "-Xlint:-cast,-rawtypes,-unchecked"
@ -330,7 +316,7 @@ dependencyLicenses {
} }
} }
if (isEclipse == false || project.path == ":server-tests") {
task integTest(type: Test) { task integTest(type: Test) {
description = 'Multi-node tests' description = 'Multi-node tests'
mustRunAfter test mustRunAfter test
@ -343,5 +329,5 @@ if (isEclipse == false || project.path == ":server-tests") {
task internalClusterTest { task internalClusterTest {
dependsOn integTest dependsOn integTest
} }
}

View File

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

View File

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

View File

@ -93,25 +93,6 @@ addSubProjects('', new File(rootProject.projectDir, 'qa'))
addSubProjects('', new File(rootProject.projectDir, 'x-pack')) addSubProjects('', new File(rootProject.projectDir, 'x-pack'))
List startTasks = gradle.startParameter.taskNames 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 << 'x-pack:plugin:core-tests'
}
include projects.toArray(new String[0]) include projects.toArray(new String[0])
@ -122,47 +103,6 @@ project(":libs").children.each { libsProject ->
libsProject.name = "elasticsearch-${libsProject.name}" 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(":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 // look for extra plugins for elasticsearch
File extraProjects = new File(rootProject.projectDir.parentFile, "${dirName}-extra") File extraProjects = new File(rootProject.projectDir.parentFile, "${dirName}-extra")
if (extraProjects.exists()) { if (extraProjects.exists()) {

View File

@ -18,9 +18,6 @@ dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
}
} }
integTest.enabled = false integTest.enabled = false

View File

@ -53,6 +53,7 @@ dependencies {
testCompile(project(':x-pack:license-tools')) { testCompile(project(':x-pack:license-tools')) {
transitive = false transitive = false
} }
} }
ext.expansions = [ ext.expansions = [
@ -93,19 +94,6 @@ forbiddenApisMain {
signaturesFiles += files('forbidden/hasher-signatures.txt') 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" compileJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"
compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked" compileTestJava.options.compilerArgs << "-Xlint:-rawtypes,-unchecked"

View File

@ -12,9 +12,6 @@ archivesBaseName = 'x-pack-frozen-indices'
dependencies { dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') 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 // xpack modules are installed in real clusters as the meta plugin, so

View File

@ -19,9 +19,6 @@ archivesBaseName = 'x-pack-flattened'
dependencies { dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
}
} }
integTest.enabled = false integTest.enabled = false

View File

@ -28,9 +28,6 @@ dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
testCompile project(":test:framework") testCompile project(":test:framework")
if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
}
} }
// copied from CCR // copied from CCR

View File

@ -12,9 +12,6 @@ esplugin {
dependencies { dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') testCompile project(path: xpackModule('core'), configuration: 'testArtifacts')
if (isEclipse) {
testCompile project(path: xpackModule('core-tests'), configuration: 'testArtifacts')
}
} }
licenseHeaders { licenseHeaders {

View File

@ -76,7 +76,7 @@ public class QuerierTests extends ESTestCase {
boolean order = randomBoolean(); boolean order = randomBoolean();
ordering[j] = order; ordering[j] = order;
Comparator comp = order ? Comparator.naturalOrder() : Comparator.reverseOrder(); 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 // Insert random no of documents (rows) with random 0/1 values for each field

View File

@ -11,9 +11,6 @@ esplugin {
dependencies { dependencies {
compileOnly project(path: xpackModule('core'), configuration: 'default') compileOnly project(path: xpackModule('core'), configuration: 'default')
testCompile project(path: xpackModule('core'), configuration: 'testArtifacts') 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 // xpack modules are installed in real clusters as the meta plugin, so