From 2a144a4ebc7e111b4857e1136fdec06c156d4a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoann=20Rodi=C3=A8re?= Date: Tue, 16 Feb 2021 10:02:10 +0100 Subject: [PATCH] IDEA setup tips From my own experience trying to import a clean project. Not sure it's enough since I had to do a bit of black magic after that (essentially invalidate caches, restart, and pray); but at least it's a start :) --- CONTRIBUTING.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae9e3443b9f90..eae0d8d60a329 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -178,7 +178,34 @@ Next navigate to _Java_ -> _Code Style_ -> _Organize Imports_. Click _Import_ an #### IDEA Setup -Open the _Preferences_ window (or _Settings_ depending on your edition) , navigate to _Plugins_ and install the [Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter) from the Marketplace. +##### How to work + +Quarkus is a large project and IDEA will have a hard time compiling the whole of it. +Before you start coding, make sure to build the project using Maven from the commandline +with `./mvnw -Dquickly`. + +##### `OutOfMemoryError` while importing + +After creating an IDEA project, the first import will most likely fail with an `OutOfMemoryError`. + +To fix that, open the _Preferences_ window (or _Settings_ depending on your edition), +then navigate to _Build, Execution, Deployment_ > _Build Tools_ > _Maven_ > _Importing_. +In _VM options for importer_, raise the heap to at least 2 GB, e.g. `-Xmx2g -Xms2g`. + +##### `package sun.misc does not exist` while building + +You may get an error like this during the build: + +``` +Error:(46, 56) java: package sun.misc does not exist +``` + +To fix this go to _Settings_ > _Build, Execution, Deployment_ > _Compiler_ > _Java Compiler_ +and disable _Use '--release' option for cross compilation (java 9 and later)_. + +##### Formatting + +Open the _Preferences_ window (or _Settings_ depending on your edition), navigate to _Plugins_ and install the [Eclipse Code Formatter Plugin](https://plugins.jetbrains.com/plugin/6546-eclipse-code-formatter) from the Marketplace. Restart your IDE, open the *Preferences* (or *Settings*) window again and navigate to _Other Settings_ -> _Eclipse Code Formatter_. @@ -420,4 +447,4 @@ This project is an open source project, please act responsibly, be nice, polite ``` [WARNING] Rule 0: ... failed with message: ... - ``` \ No newline at end of file + ```