Avoid sharing source directories as it breaks intellij#40877
Merged
alpar-t merged 8 commits intoelastic:masterfrom Apr 8, 2019
Merged
Avoid sharing source directories as it breaks intellij#40877alpar-t merged 8 commits intoelastic:masterfrom
alpar-t merged 8 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-core-infra |
# Conflicts: # x-pack/qa/full-cluster-restart/build.gradle
alpar-t
pushed a commit
that referenced
this pull request
Apr 8, 2019
* Avoid sharing source directories as it breaks intellij * Subprojects share main project output classes directory * Fix jar hell * Fix sql security with ssl integ tests * Relax dependency ordering rule so we don't explode on cycles
alpar-t
pushed a commit
that referenced
this pull request
Apr 8, 2019
* Avoid sharing source directories as it breaks intellij * Subprojects share main project output classes directory * Fix jar hell * Fix sql security with ssl integ tests * Relax dependency ordering rule so we don't explode on cycles
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Apr 8, 2019
…e-unsafe-publication * elastic/master: Update contributing docs to reflect JDK 11 (elastic#40955) Docs: Simplifying setup by using module configuration variant syntax (elastic#40879) Unmute CreateIndexIT testCreateAndDeleteIndexConcurrently CI failures (elastic#40960) Revert "Short-circuit rebalancing when disabled (elastic#40942)" Mute EnableAllocationShortCircuitTests SQL: Refactor args verification of In & conditionals (elastic#40916) Avoid sharing source directories as it breaks intellij (elastic#40877) Short-circuit rebalancing when disabled (elastic#40942) SQL: Prefer resultSets over exceptions in metadata (elastic#40641) Mute ClusterPrivilegeTests.testThatSnapshotAndRestore Fix Race in AsyncTwoPhaseIndexerTests.testStateMachine (elastic#40947) Relax Overly Strict Assertion in TransportShardBulkAction (elastic#40940)
mark-vieira
added a commit
to mark-vieira/elasticsearch
that referenced
this pull request
Apr 9, 2019
(cherry picked from commit 71d407f)
mark-vieira
added a commit
that referenced
this pull request
Apr 9, 2019
gurkankaymak
pushed a commit
to gurkankaymak/elasticsearch
that referenced
this pull request
May 27, 2019
* Avoid sharing source directories as it breaks intellij * Subprojects share main project output classes directory * Fix jar hell * Fix sql security with ssl integ tests * Relax dependency ordering rule so we don't explode on cycles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR includes changes to allow the project to be imported correctly into IntelliJ 2019.1. In this version of IntelliJ a long-standing limitation is now strictly enforced even when importing from Gradle, which is that no two modules can share a single content root. This means that two projects cannot share a source or resource directory, instead we must rely purely on project dependencies for this sort of thing.
For the most part, we were already using project dependencies for this. For projects that depended on test sources from another project the
testArtifactsconfiguration was being used. This works fine when compiling and running unit tests in the IDE, however this breaks down in Gradle because of the way we load certain test resources. Our test fixtures rely on being able to resolve these resources to a filesystem path, which doesn't work if it's embedded in a JAR, which is how Gradle wires up project dependencies by default. We overcome this by simply copying these shared resources to the target projects build directory.One alternate way to do this might be to leverage Gradle's support for dependency variants and expose a variant which uses the classes and resources output directories instead of a JAR for test dependencies similarly to how the
java-libraryplugin works. This would probably be a more involved change however so to unblock folks to use IntelliJ 2019.1 this seems a reasonable enough workaround.This PR also removes some unnecessary idea plugin configuration to workaround a Gradle IntelliJ import issue that has since been addressed. This customization of the generated XML project files is the only thing I could see that required the need to run the
ideatask prior to project import so that requirement has also been removed.