From dadb0debf64e5694646b64b61eddc0e4b0338aa8 Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Sun, 20 Sep 2015 11:09:10 -0700 Subject: [PATCH] Adds instructions for using Intellij Took me a while to get rid of lombok related compile failures in Intellij. Also, it is easy to accidentally not set the spring maven profile. Hopefully, this helps other users. --- docs/src/main/asciidoc/building-base.adoc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/src/main/asciidoc/building-base.adoc b/docs/src/main/asciidoc/building-base.adoc index e414a521..b2ae4507 100644 --- a/docs/src/main/asciidoc/building-base.adoc +++ b/docs/src/main/asciidoc/building-base.adoc @@ -108,5 +108,17 @@ The method getId() is undefined for the type ProxyRouteLocator.ProxyRouteSpec The method getLocation() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 55 Java Problem ---- +==== Importing into Intellij +Spring Cloud projects use annotation processing, particularly Lombok, which requires configuration +or you will encounter compile problems. It also needs a specific version of maven and a profile +enabled. Intellij 14.1+ requires some configuration to ensure these are setup properly. + + 1. Click Preferences, Plugins. *Ensure Lombok is installed* + 2. Click New, Project from Existing Sources, choose your spring-cloud-sleuth directory + 3. Choose Maven, and select Environment Settings. *Ensure you are using Maven 3.3.3* + 4. In the next screen, *Select the profile `spring`* click Next until Finish. + 5. Click Preferences, "Build, Execution, Deployment", Compiler, Annotation Processors. *Click Enable Annotation Processing* + 6. Click Build, Rebuild Project, and you are ready to go! + ==== Importing into other IDEs Maven is well supported by most Java IDEs. Refer to you vendor documentation.