From 1385e25542c78f9122f43727743e54a3e2a545a3 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 3 May 2016 09:20:19 -0400 Subject: [PATCH] Add note on configuring assertions in IDEs This commit adds a note to the contributing docs on how to configure assertions inside Eclipse and IntelliJ. Relates #18107 --- CONTRIBUTING.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9afcd34fad7..9f7264acdae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,7 +76,31 @@ Contributing to the Elasticsearch codebase **Repository:** [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch) -Make sure you have [Gradle](http://gradle.org) installed, as Elasticsearch uses it as its build system. Integration with IntelliJ and Eclipse should work out of the box. Eclipse users can automatically configure their IDE: `gradle 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. +Make sure you have [Gradle](http://gradle.org) installed, as +Elasticsearch uses it as its build system. + +Eclipse users can automatically configure their IDE: `gradle 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. + +IntelliJ users acn automatically configure their IDE: `gradle idea` +then `File->New Project From Existing Sources`. Point to the root of +the source directory, select +`Import project from external model->Gradle`, enable +`Use auto-import`. + +The Elasticsearch codebase makes heavy use of Java `assert`s and the +test runner requires that assertions be enabled within the JVM. This +can be accomplished by passing the flag `-ea` to the JVM on startup. + +For IntelliJ, go to +`Run->Edit Configurations...->Defaults->JUnit->VM options` and input +`-ea`. + +For Eclipse, go to `Preferences->Java->Installed JREs` and add `-ea` to +`VM Arguments`. Please follow these formatting guidelines: