From 6de956210e7b72d527d49e0d375d7b2311dbde59 Mon Sep 17 00:00:00 2001
From: Antoine Rey <antoine.rey@gmail.com>
Date: Mon, 8 Oct 2018 10:10:41 +0200
Subject: [PATCH] Add documentation for IntelliJ IDEA

See gh-358
---
 readme.md | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/readme.md b/readme.md
index b6fd602..bc4111c 100644
--- a/readme.md
+++ b/readme.md
@@ -40,17 +40,16 @@ You could start MySql locally with whatever installer works for your OS, or with
 docker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8
 ```
 
-## Working with Petclinic in Eclipse/STS
+## Working with Petclinic in your IDE
 
 ### prerequisites
 The following items should be installed in your system:
 * Java 8 or newer.
 * git command line tool (https://help.github.com/articles/set-up-git)
-* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse)
-
-Note: when m2e is available, there is an m2 icon in Help -> About dialog.
-If m2e is not there, just follow the install process here: http://www.eclipse.org/m2e/m2e-downloads.html
-
+* Your prefered IDE 
+  * Eclipse with the m2e plugin. Note: when m2e is available, there is an m2 icon in Help -> About dialog. If m2e is not there, just follow the install process here: http://www.eclipse.org/m2e/
+  * or [Spring Tools Suite](https://spring.io/tools) (STS)
+  * or IntelliJ IDEA
 
 ### Steps:
 
@@ -58,12 +57,22 @@ If m2e is not there, just follow the install process here: http://www.eclipse.or
 ```
 git clone https://github.com/spring-projects/spring-petclinic.git
 ```
-2) Inside Eclipse
+2) Inside Eclipse or STS
 ```
 File -> Import -> Maven -> Existing Maven project
 ```
 
-Then either build on the command line `./mvnw install` or using the Eclipse launcher (right click on project and `Run As -> Maven install`) to generate the css. Run the application main method by right clicking on it and choosing `Run As -> Java Application`. Visit [http://localhost:8080](http://localhost:8080) in your browser.
+Then either build on the command line `./mvnw install` or using the Eclipse launcher (right click on project and `Run As -> Maven install`) to generate the css. Run the application main method by right clicking on it and choosing `Run As -> Java Application`.
+
+3) Or inside IntelliJ IDEA
+
+On the main menu, select `File -> Open`. Select the Petclinic [pom.xml](pom.xml). Click on the `Open as Project` button.
+Then either build on the command line `./mvnw install` or right click on the `spring-petclinic` project then `Maven -> Generates sources and Update Folders` to generate the CSS.
+Run the application by right clicking on the `PetClinicApplication` main class and choosing `Run 'PetClinicApplication'`.
+
+4) Navigate to Petclinic
+
+Visit [http://localhost:8080](http://localhost:8080) in your browser.
 
 
 ## Looking for something in particular?
-- 
GitLab