diff --git a/README.md b/README.md index dac5abdac52ee..01ba38da2a6ba 100644 --- a/README.md +++ b/README.md @@ -136,21 +136,45 @@ required plugins. ### Intellij +#### Configure Project JDK to Java 8 (1.8) JDK + +1. Open **Project Settings**. + + Click **File** -> **Project Structure** -> **Project Settings** -> **Project**. + +2. Select the JDK version. + + From the JDK version drop-down list, select **Download JDK...** or choose an existing recent Java 8 (1.8) JDK version. + +3. In the download dialog, select version **1.8**. You can pick a version from many vendors. Unless you have a specific preference, choose **AdoptOpenJDK (Hotspot)**. + + +#### Configure Java version for Maven in IntelliJ + +1. Open Maven Importing Settings dialog by going to + **Settings** -> **Build, Execution, Deployment** -> **Build Tools** -> **Maven** -> **Importing**. + +2. Choose **Use Project JDK** for **JDK for Importer** setting. This uses the Java 8 (1.8) JDK for running Maven + when importing the project to IntelliJ. Some of the configuration in the Maven build is conditional based on + the JDK version. Incorrect configuration gets chosen when the "JDK for Importer" isn't the same as the "Project JDK". + +3. Validate that the JRE setting in **Maven** -> **Runner** dialog is set to **Use Project JDK**. + #### Configure annotation processing in IntelliJ 1. Open Annotation Processors Settings dialog box by going to - `Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors`. + **Settings** -> **Build, Execution, Deployment** -> **Compiler** -> **Annotation Processors**. 2. Select the following buttons: - 1. "Enable annotation processing" - 2. "Obtain processors from project classpath" - 3. "Store generated sources relative to: Module content root" + 1. **Enable annotation processing** + 2. **Obtain processors from project classpath** + 3. Store generated sources relative to: **Module content root** 3. Set the generated source directories to be equal to the Maven directories: 1. Set "Production sources directory:" to "target/generated-sources/annotations". 2. Set "Test sources directory:" to "target/generated-test-sources/test-annotations". -4. Click "OK". +4. Click **OK**. 5. Install the lombok plugin in intellij. diff --git a/site2/website/contributing.md b/site2/website/contributing.md index 5adcd617fa221..b84d9c91413cf 100644 --- a/site2/website/contributing.md +++ b/site2/website/contributing.md @@ -118,43 +118,10 @@ these two remotes for pushing changes). You are now ready to start developing! -#### [Optional] IDE Setup +#### IDE Setup -Depending on your preferred development environment, you may need to prepare it to develop Pulsar code. +For how to set up IDE, see [here](https://github.com/apache/pulsar/blob/master/README.md#setting-up-your-ide). -##### IntelliJ - -###### Enable Annotation Processing - -To configure annotation processing in IntelliJ: - -1. Open Annotation Processors Settings dialog box by going to Settings -> Build, Execution, Deployment -> Compiler -> Annotation Processors. -1. Select the following buttons: - 1. "Enable annotation processing" - 1. "Obtain processors from project classpath" - 1. "Store generated sources relative to: Module content root" -1. Set the generated source directories to be equal to the Maven directories: - 1. Set "Production sources directory:" to "target/generated-sources/annotations". - 1. Set "Test sources directory:" to "target/generated-test-sources/test-annotations". -1. Click "OK". - -##### Eclipse - -Use a recent Eclipse version that includes m2e. Start Eclipse with a fresh workspace in a -separate directory from your checkout. - -###### Initial setup - -1. Import the Pulsar projects - - File - -> Import... - -> Existing Maven Projects - -> Browse to the directory you cloned into and select "pulsar" - -> make sure all pulsar projects are selected - -> Finalize - -You now should have all the Pulsar projects imported into eclipse and should see no compile errors. ### Create a branch in your fork