From bb85d799b3ba549c8a29afab0b246cb13b10507a Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Fri, 6 Jan 2017 01:20:48 +0100 Subject: setup pages added. --- website2/templates/setup/_setup.html | 28 ++++++++++++ website2/templates/setup/android.html | 80 ++++++++++++++++++++++++++++++++++ website2/templates/setup/ecj.html | 31 +++++++++++++ website2/templates/setup/eclipse.html | 26 +++++++++++ website2/templates/setup/gwt.html | 16 +++++++ website2/templates/setup/intellij.html | 22 ++++++++++ website2/templates/setup/javac.html | 15 +++++++ website2/templates/setup/netbeans.html | 16 +++++++ 8 files changed, 234 insertions(+) create mode 100644 website2/templates/setup/_setup.html create mode 100644 website2/templates/setup/android.html create mode 100644 website2/templates/setup/ecj.html create mode 100644 website2/templates/setup/eclipse.html create mode 100644 website2/templates/setup/gwt.html create mode 100644 website2/templates/setup/intellij.html create mode 100644 website2/templates/setup/javac.html create mode 100644 website2/templates/setup/netbeans.html (limited to 'website2/templates/setup') diff --git a/website2/templates/setup/_setup.html b/website2/templates/setup/_setup.html new file mode 100644 index 00000000..e5c2c007 --- /dev/null +++ b/website2/templates/setup/_setup.html @@ -0,0 +1,28 @@ +<#import "/_scaffold.html" as main> + +<#macro introduction> +
+ <#nested> +
+ + +<#macro section title> +
+

${title}

+ + <#nested> +
+ + +<#macro scaffold title load=[]> + <@main.scaffold load> + + + diff --git a/website2/templates/setup/android.html b/website2/templates/setup/android.html new file mode 100644 index 00000000..3ff857e5 --- /dev/null +++ b/website2/templates/setup/android.html @@ -0,0 +1,80 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="Android"> + <@s.introduction> +

+ Android development with lombok is easy and won't make your android application any 'heavier' because lombok is a compile-time only library. It is important to configure your android project properly to make sure lombok doesn't end up in your application and waste precious space on android devices. +

+ The instructions listed below are excerpts from The + AndroidAnnotations project cookbook. You may wish to refer to that documentation for complete instructions; lombok is just + the equivalent to androidannotations-VERSION.jar; there is no -api aspect. +

+ + + <@s.section title="Gradle"> +

+

+

+ + + <@s.section title="Android Studio"> +

+ Follow the previous instructions (Gradle). In addition to setting up your gradle project correctly, you need to add the Lombok IntelliJ plugin to add lombok support to Android Studio: +

+

+ + + <@s.section title="Eclipse"> +

+ In eclipse, create a 'lightweight' lombok jar that contains only the annotations by running:

+

+java -jar lombok.jar publicApi
+ Then, add the lombok-api.jar file created by running this command to your android project instead of the complete lombok.jar, and, as usual, install lombok into eclipse by double-clicking lombok.jar. +

+ + + <@s.section title="Maven"> +

+ You should be able to just follow the normal lombok with maven instructions.
+ Note that if you use android, eclipse, and maven together you may have to replace lombok.jar in your eclipse android project's build path (which you can modify in that project's properties page) with lombok-api.jar, as produced in the procedure explained for Eclipse, above. +

+ + + <@s.section title="Ant"> +

+

+

+ + diff --git a/website2/templates/setup/ecj.html b/website2/templates/setup/ecj.html new file mode 100644 index 00000000..9d56a085 --- /dev/null +++ b/website2/templates/setup/ecj.html @@ -0,0 +1,31 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="ecj"> + <@s.introduction> +

+ ecj (the eclipse standalone compiler) is compatible with lombok. Use the following command line to enable lombok with ecj: +

java -javaagent:lombok.jar=ECJ -jar ecj.jar -cp lombok.jar -source 1.8 (rest of arguments)
+

+ You may have to add the following VM argument, if you're using an older version of lombok or java: +

-Xbootclasspath/p:lombok.jar
+

+ If you're using a tool based on ecj, adding these VM arguments and adding lombok.jar to the classpath should work. +

+ + + <@s.section title="Maven"> +

+ It is possible to configure maven-compiler-plugin with maven-dependency-plugin and plexus-compiler-eclipse. +

+ Before the compile phase, you will have to set your MAVEN_OPTS environment variable to include the javaagent argument. In the example below, target is your ${r"${project.build.directory}"}. +

+ Use the following commands in sequence to enable lombok with ecj in your Maven build: +

+mvn clean dependency:copy@get-lombok
+set MAVEN_OPTS=-javaagent:target/lombok.jar=ECJ (or your OS's equivalent)
+mvn install
+set MAVEN_OPTS= (or your OS's equivalent)
+
+

+ + diff --git a/website2/templates/setup/eclipse.html b/website2/templates/setup/eclipse.html new file mode 100644 index 00000000..85304c83 --- /dev/null +++ b/website2/templates/setup/eclipse.html @@ -0,0 +1,26 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="Eclipse, Spring Tool Suite, (Red Hat) JBoss Developer Studio, MyEclipse"> + <@s.introduction> +

+ The Eclipse editor is compatible with lombok. Eclipse offshoots are also compatible with lombok, specifically: +

+

+ Double-click lombok.jar (downloadable from this site, or from your maven repository; it's the same jar). This starts the eclipse installer which will find eclipse (and eclipse variants as listed above), and offers to install lombok into these eclipse installations. The same tool can also uninstall lombok:
+ + +

+ You can check if your eclipse installation is lombok-enabled in eclipse's about dialog. The lombok version will be listed at the end of the copyright text:

+ + +

+ + diff --git a/website2/templates/setup/gwt.html b/website2/templates/setup/gwt.html new file mode 100644 index 00000000..142362ac --- /dev/null +++ b/website2/templates/setup/gwt.html @@ -0,0 +1,16 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="GWT"> + <@s.introduction> +

+ GWT (Google Web Toolkit) is compatible with lombok. +

+ Edit your proj-debug and proj-compile batch scripts to add the following VM arguments: +

+java -javaagent:lombok.jar=ECJ (rest of arguments)
+
+

+ Thanks to Stephen Haberman for figuring this out. +

+ + diff --git a/website2/templates/setup/intellij.html b/website2/templates/setup/intellij.html new file mode 100644 index 00000000..0230c59a --- /dev/null +++ b/website2/templates/setup/intellij.html @@ -0,0 +1,22 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="IntelliJ IDEA"> + <@s.introduction> +

+ The Jetbrains IntelliJ IDEA editor is compatible with lombok. +

+ Add the Lombok IntelliJ plugin to add lombok support IntelliJ: +

+

+ + diff --git a/website2/templates/setup/javac.html b/website2/templates/setup/javac.html new file mode 100644 index 00000000..9cc9a560 --- /dev/null +++ b/website2/templates/setup/javac.html @@ -0,0 +1,15 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="JavaC"> + <@s.introduction> +

+ Just put lombok on the classpath when compiling with any javac (version 1.6 - 1.8): javac -cp lombok.jar .... +

+ + + <@s.section title="JDK 9"> +

+ Support for JDK9 is ongoing. You need to set up some configuration to make lombok play nice with jigsaw (the JDK9 module system). The github issue about JDK9 support for Lombok has the details on how to set it up. +

+ + diff --git a/website2/templates/setup/netbeans.html b/website2/templates/setup/netbeans.html new file mode 100644 index 00000000..eccd9e93 --- /dev/null +++ b/website2/templates/setup/netbeans.html @@ -0,0 +1,16 @@ +<#import "_setup.html" as s> + +<@s.scaffold title="Netbeans"> + <@s.introduction> +

+ The Netbeans editor is compatible with lombok. +

  1. + Add lombok.jar to the project libraries. +
  2. + In the project properties, in the section Build – Compiling, check the 'Enable Annotation Processing in Editor' checkbox. +
+ + +

+ + -- cgit