aboutsummaryrefslogtreecommitdiff
path: root/website/templates/setup
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2017-05-08 21:28:02 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2017-05-29 21:02:54 +0200
commit8b7a7cbc813653a3248d6cf3a7779e220957bc85 (patch)
treeb9acfb9d68c6866acc3cfb9ee59d72ff43f1ebc3 /website/templates/setup
parent72fd50b9f1db1ab6bfc1753ba6a1e686a2f0f22c (diff)
downloadlombok-8b7a7cbc813653a3248d6cf3a7779e220957bc85.tar.gz
lombok-8b7a7cbc813653a3248d6cf3a7779e220957bc85.tar.bz2
lombok-8b7a7cbc813653a3248d6cf3a7779e220957bc85.zip
The great rename: the old ‘website’ is now ‘website-old’, and ‘website2’ is now ‘website’.
Diffstat (limited to 'website/templates/setup')
-rw-r--r--website/templates/setup/_setup.html28
-rw-r--r--website/templates/setup/android.html80
-rw-r--r--website/templates/setup/ecj.html31
-rw-r--r--website/templates/setup/eclipse.html26
-rw-r--r--website/templates/setup/gwt.html16
-rw-r--r--website/templates/setup/intellij.html22
-rw-r--r--website/templates/setup/javac.html15
-rw-r--r--website/templates/setup/netbeans.html16
8 files changed, 234 insertions, 0 deletions
diff --git a/website/templates/setup/_setup.html b/website/templates/setup/_setup.html
new file mode 100644
index 00000000..e5c2c007
--- /dev/null
+++ b/website/templates/setup/_setup.html
@@ -0,0 +1,28 @@
+<#import "/_scaffold.html" as main>
+
+<#macro introduction>
+ <div class="row">
+ <#nested>
+ </div>
+</#macro>
+
+<#macro section title>
+ <div class="row">
+ <h3>${title}</h3>
+
+ <#nested>
+ </div>
+</#macro>
+
+<#macro scaffold title load=[]>
+ <@main.scaffold load>
+ <div class="page-header top5" id="featureContent">
+ <div class="row text-center">
+ <div class="header-group">
+ <h1>${title}</h1>
+ </div>
+ </div>
+ <#nested>
+ </div>
+ </@main.scaffold>
+</#macro>
diff --git a/website/templates/setup/android.html b/website/templates/setup/android.html
new file mode 100644
index 00000000..3ff857e5
--- /dev/null
+++ b/website/templates/setup/android.html
@@ -0,0 +1,80 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="Android">
+ <@s.introduction>
+ <p>
+ 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.
+ </p><p>
+ The instructions listed below are excerpts from <a href="https://github.com/excilys/androidannotations/wiki/Cookbook">The
+ AndroidAnnotations project cookbook</a>. You may wish to refer to that documentation for complete instructions; lombok is just
+ the equivalent to <code>androidannotations-VERSION.jar</code>; there is no <code>-api</code> aspect.
+ </p>
+ </@s.introduction>
+
+ <@s.section title="Gradle">
+ <p>
+ <ul><li>
+ Make sure that the version of your android plugin is <code>&gt;= 0.4.3</code>
+ </li><li>
+ Add Lombok to your application's <code>dependencies</code> block:<br /><br />
+<pre>
+ provided "org.projectlombok:lombok:${version}"
+</pre>
+ </li><li>
+ When using <a href="https://bitbucket.org/hvisser/android-apt">android-apt</a>, you also have to specify Lombok as an annotation processor (with the <code>apt</code> directive) in the <code>dependencies</code> block:<br /><br />
+<pre>
+ provided "org.projectlombok:lombok:${version}"
+ apt "org.projectlombok:lombok:${version}"
+</pre>
+ </li></ul>
+ </p>
+ </@s.section>
+
+ <@s.section title="Android Studio">
+ <p>
+ Follow the previous instructions (<em>Gradle</em>). In addition to setting up your gradle project correctly, you need to add the <a href="https://plugins.jetbrains.com/plugin/6317">Lombok IntelliJ plugin</a> to add lombok support to Android Studio:
+ <ul><li>
+ Go to <code>File &gt; Settings &gt; Plugins</code>
+ </li><li>
+ Click on <code>Browse repositories...</code>
+ </li><li>
+ Search for <code>Lombok Plugin</code>
+ </li><li>
+ Click on <code>Install plugin</code>
+ </li><li>
+ Restart Android Studio
+ </li></ul>
+ </p>
+ </@s.section>
+
+ <@s.section title="Eclipse">
+ <p>
+ In eclipse, create a 'lightweight' lombok jar that contains only the annotations by running:<br /><br />
+ <pre>
+java -jar lombok.jar publicApi</pre>
+ Then, add the <code>lombok-api.jar</code> file created by running this command to your android project instead of the complete <code>lombok.jar</code>, and, as usual, install lombok into eclipse by double-clicking <code>lombok.jar</code>.
+ </p>
+ </@s.section>
+
+ <@s.section title="Maven">
+ <p>
+ You should be able to just follow the normal <a href="../mavenrepo/index.html">lombok with maven instructions</a>.<br />
+ Note that if you use android, eclipse, and maven together you may have to replace <code>lombok.jar</code> in your eclipse android project's build path (which you can modify in that project's properties page) with <code>lombok-api.jar</code>, as produced in the procedure explained for <em>Eclipse</em>, above.
+ </p>
+ </@s.section>
+
+ <@s.section title="Ant">
+ <p>
+ <ul><li>
+ Find <code>build.xml</code> in <code>${r"${ANDROID_SDK_ROOT}"}/tools/ant/build.xml</code> and copy the <code>-compile</code> target into the paste buffer.
+ </li><li>
+ Copy this to the <code>build.xml</code> of your own project, right before the <code>&lt;import file="${r"${sdk.dir}"}/tools/ant/build.xml"&gt;</code> line.
+ </li><li>
+ Create a <code>compile-libs</code> directory in your own project and copy the complete <code>lombok.jar</code> to it.
+ </li><li>
+ Now modify the <code>&lt;classpath&gt;</code> entry inside the <code>&lt;javac&gt;</code> task in the <code>-compile</code> target you just copied:<br />
+ add <code>&lt;fileset dir="compile-libs" includes="*.jar" /&gt;</code> to it.
+ </li></ul>
+ </p>
+ </@s.section>
+</@s.scaffold>
diff --git a/website/templates/setup/ecj.html b/website/templates/setup/ecj.html
new file mode 100644
index 00000000..9d56a085
--- /dev/null
+++ b/website/templates/setup/ecj.html
@@ -0,0 +1,31 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="ecj">
+ <@s.introduction>
+ <p>
+ ecj (the eclipse standalone compiler) is compatible with lombok. Use the following command line to enable lombok with ecj:
+ <pre>java <strong>-javaagent:lombok.jar=ECJ</strong> -jar ecj.jar -cp lombok.jar -source 1.8 <em class="note">(rest of arguments)</em></pre>
+ </p><p>
+ You may have to add the following VM argument, if you're using an older version of lombok or java:
+ <pre><strong>-Xbootclasspath/p:lombok.jar</strong></pre>
+ </p><p>
+ If you're using a tool based on ecj, adding these VM arguments and adding lombok.jar to the classpath should work.
+ </p>
+ </@s.introduction>
+
+ <@s.section title="Maven">
+ <p>
+ It is possible to <a href="/files/pom.xml">configure</a> <code>maven-compiler-plugin</code> with <code>maven-dependency-plugin</code> and <code>plexus-compiler-eclipse</code>.
+ </p><p>
+ Before the <code>compile</code> phase, you will have to set your <code>MAVEN_OPTS</code> environment variable to include the <code>javaagent</code> argument. In the example below, <code>target</code> is your <code>${r"${project.build.directory}"}</code>.
+ </p><p>
+ Use the following commands in sequence to enable lombok with ecj in your Maven build:
+<pre>
+mvn clean <strong>dependency:copy@get-lombok</strong>
+set MAVEN_OPTS=<strong>-javaagent:target/lombok.jar=ECJ</strong> <em class="note">(or your OS's equivalent)</em>
+mvn install
+set MAVEN_OPTS= <em class="note">(or your OS's equivalent)</em>
+</pre>
+ </p>
+ </@s.section>
+</@s.scaffold>
diff --git a/website/templates/setup/eclipse.html b/website/templates/setup/eclipse.html
new file mode 100644
index 00000000..85304c83
--- /dev/null
+++ b/website/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>
+ <p>
+ The <a href="https://eclipse.org/">Eclipse</a> editor is compatible with lombok. Eclipse offshoots are also compatible with lombok, specifically:
+ <ul><li>
+ <a href="https://www.genuitec.com/products/myeclipse/">MyEclipse</a>
+ </li><li>
+ <a href="https://developers.redhat.com/products/devstudio/overview/">Red Hat JBoss Developer Studio</a>
+ </li><li>
+ <a href="https://tools.jboss.org/downloads/devstudio/">JBoss Developer Studio (JBDS)</a>
+ </li><li>
+ <a href="https://spring.io/tools">Spring Tools Suite (STS)</a>
+ </li></ul>
+ </p><p>
+ 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: <br />
+
+ <img src="/img/lombok-installer.png" />
+ </p><p>
+ 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:<br /><br />
+
+ <img src="/img/eclipse-about.png" />
+ </p>
+ </@s.introduction>
+</@s.scaffold>
diff --git a/website/templates/setup/gwt.html b/website/templates/setup/gwt.html
new file mode 100644
index 00000000..142362ac
--- /dev/null
+++ b/website/templates/setup/gwt.html
@@ -0,0 +1,16 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="GWT">
+ <@s.introduction>
+ <p>
+ <a href="http://www.gwtproject.org/">GWT (Google Web Toolkit)</a> is compatible with lombok.
+ </p><p>
+ Edit your <code>proj-debug</code> and <code>proj-compile</code> batch scripts to add the following VM arguments:
+<pre>
+java <strong>-javaagent:lombok.jar=ECJ</strong> <em>(rest of arguments)</em>
+</pre>
+ </p><p>
+ Thanks to Stephen Haberman for figuring this out.
+ </p>
+ </@s.introduction>
+</@s.scaffold>
diff --git a/website/templates/setup/intellij.html b/website/templates/setup/intellij.html
new file mode 100644
index 00000000..0230c59a
--- /dev/null
+++ b/website/templates/setup/intellij.html
@@ -0,0 +1,22 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="IntelliJ IDEA">
+ <@s.introduction>
+ <p>
+ The <a href="https://www.jetbrains.com/idea/">Jetbrains IntelliJ IDEA</a> editor is compatible with lombok.
+ </p><p>
+ Add the <a href="https://plugins.jetbrains.com/plugin/6317">Lombok IntelliJ plugin</a> to add lombok support IntelliJ:
+ <ul><li>
+ Go to <code>File &gt; Settings &gt; Plugins</code>
+ </li><li>
+ Click on <code>Browse repositories...</code>
+ </li><li>
+ Search for <code>Lombok Plugin</code>
+ </li><li>
+ Click on <code>Install plugin</code>
+ </li><li>
+ Restart Android Studio
+ </li></ul>
+ </p>
+ </@s.introduction>
+</@s.scaffold>
diff --git a/website/templates/setup/javac.html b/website/templates/setup/javac.html
new file mode 100644
index 00000000..9cc9a560
--- /dev/null
+++ b/website/templates/setup/javac.html
@@ -0,0 +1,15 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="JavaC">
+ <@s.introduction>
+ <p>
+ Just put lombok on the classpath when compiling with any javac (version 1.6 - 1.8): <code>javac -cp lombok.jar ....</code>
+ </p>
+ </@s.introduction>
+
+ <@s.section title="JDK 9">
+ <p>
+ Support for JDK9 is ongoing. You need to set up some configuration to make lombok play nice with jigsaw (the JDK9 module system). The <a href="https://github.com/rzwitserloot/lombok/issues/985">github issue about JDK9 support for Lombok</a> has the details on how to set it up.
+ </p>
+ </@s.section>
+</@s.scaffold>
diff --git a/website/templates/setup/netbeans.html b/website/templates/setup/netbeans.html
new file mode 100644
index 00000000..eccd9e93
--- /dev/null
+++ b/website/templates/setup/netbeans.html
@@ -0,0 +1,16 @@
+<#import "_setup.html" as s>
+
+<@s.scaffold title="Netbeans">
+ <@s.introduction>
+ <p>
+ The <a href="https://netbeans.org/">Netbeans</a> editor is compatible with lombok.
+ <ol><li>
+ Add <code>lombok.jar</code> to the project libraries.
+ </li><li>
+ In the project properties, in the section <code>Build &ndash; Compiling</code>, check the <code>&#39;Enable Annotation Processing in Editor&#39;</code> checkbox.
+ </li></ol>
+
+ <img src="/img/netbeans-enable-annotation-processing-in-editor.png" />
+ </p>
+ </@s.introduction>
+</@s.scaffold>