You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by mc...@apache.org on 2018/09/12 21:37:54 UTC
[geode] branch develop updated: Adding IntelliJ setup instructions
to BUILDING.md (#2456)
This is an automated email from the ASF dual-hosted git repository.
mcmellawatt pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new bafaeff Adding IntelliJ setup instructions to BUILDING.md (#2456)
bafaeff is described below
commit bafaeffe701a45bdf032a08763ea4fe437f885ab
Author: Ryan McMahon <rm...@pivotal.io>
AuthorDate: Wed Sep 12 14:37:48 2018 -0700
Adding IntelliJ setup instructions to BUILDING.md (#2456)
Adding IntelliJ setup instructions to BUILDING.md
---
BUILDING.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/BUILDING.md b/BUILDING.md
index 1086bdd..b9d396e 100644
--- a/BUILDING.md
+++ b/BUILDING.md
@@ -30,3 +30,60 @@ v1.1.0
```
Note: on Windows invoke the `gfsh.bat` script to print the version string.
+
+## Setting up IntelliJ
+
+The following steps have been tested with:
+
+* **IntelliJ IDEA 2018.2.2**
+
+1. Run `./gradlew --parallel devBuild` from Geode repository root to create compiler generated source
+
+2. Import project into IntelliJ IDEA
+
+ From the **Welcome to IntelliJ IDEA** window:
+
+ 1. **Import Project ->** select *build.gradle* file from Geode repository root and press **Open**.
+ 2. Enable **Use auto-import**
+ 3. Enable **Create separate module per source set**
+ 4. Select **Use Project JDK 1.8.0_*nnn*** where *nnn* is latest build required for Geode
+
+3. Change Code Style Scheme to GeodeStyle
+
+ Navigate to **IntelliJ IDEA -> Preferences... -> Editor -> Code Style**. Select *GeodeStyle* in Scheme drop-down box if it already exists.
+
+ To define the *GeodeStyle* in **Scheme**, select the gear icon next to the drop-down box, click **Import Scheme ->** and select **IntelliJ IDEA code style XML**. Select *etc/intellij-java-modified-google-style.xml* from Geode repository root, enter **To:** *GeodeStyle*, check **Current scheme** and press **OK**.
+
+4. Make Apache the default Copyright
+
+ Navigate to **IntelliJ IDEA -> Preferences... -> Editor -> Copyright**. Select *Apache* in drop-down box **Default project copyright**.
+
+ To define *Apache* in **Copyright**, navigate to **IntelliJ IDEA -> Preferences... -> Editor -> Copyright -> Copyright Profiles**. Click **+** to add a new project. Enter *Apache* as the **Name** and enter the following block without asterisks or leading spaces:
+
+ ```text
+ Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ agreements. See the NOTICE file distributed with this work for additional information regarding
+ copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance with the License. You may obtain a
+ copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software distributed under the License
+ is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ or implied. See the License for the specific language governing permissions and limitations under
+ the License.
+ ```
+
+ ...then return to **Copyright** and select *Apache* in drop-down box **Default project copyright**.
+
+ Navigate to **IntelliJ IDEA -> Preferences... -> Editor -> Copyright -> Formatting**. Uncheck **Add blank line after** and press **OK**.
+
+5. Rebuild Project
+
+ Navigate to **Build -> Rebuild Project** and the full project should compile without errors.
+
+ Some optional sanity tests to make sure things are working properly:
+ * Try looking up classes using **Navigate -> Class...**
+ * Open and run a distributed test such as BasicDistributedTest in geode-core.
+ * Create a new java class and ensure the Apache license is automatically added to the top of the file with no blank line before the package line.