diff options
Diffstat (limited to 'website2/templates')
-rw-r--r-- | website2/templates/_scaffold.html | 26 | ||||
-rw-r--r-- | website2/templates/setup/_setup.html | 28 | ||||
-rw-r--r-- | website2/templates/setup/android.html | 80 | ||||
-rw-r--r-- | website2/templates/setup/ecj.html | 31 | ||||
-rw-r--r-- | website2/templates/setup/eclipse.html | 26 | ||||
-rw-r--r-- | website2/templates/setup/gwt.html | 16 | ||||
-rw-r--r-- | website2/templates/setup/intellij.html | 22 | ||||
-rw-r--r-- | website2/templates/setup/javac.html | 15 | ||||
-rw-r--r-- | website2/templates/setup/netbeans.html | 16 |
9 files changed, 252 insertions, 8 deletions
diff --git a/website2/templates/_scaffold.html b/website2/templates/_scaffold.html index 5da9e144..f0198fa3 100644 --- a/website2/templates/_scaffold.html +++ b/website2/templates/_scaffold.html @@ -1,6 +1,6 @@ -<#macro feature title code> +<#macro feature title href> <div class="bs-callout bs-callout-danger"> - <h4><a href="${code}"><code>${title}</code></a></h4> + <h4><a href="${href}"><code>${title}</code></a></h4> <p><#nested></p> </div> </#macro> @@ -33,6 +33,7 @@ <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="/js/swfobject.js"></script> + <script src="/js/history.js"></script> <script src="/js/main.js"></script> <#list load as ld> <#if ld?ends_with(".js")> @@ -61,8 +62,8 @@ <li class="dropdown"> <a class="dropdown-toggle pointer" data-toggle="dropdown">Features<span class="caret"></span></a> <ul class="dropdown-menu" aria-labelledby="themes"> - <li><a href="/features/stable">Stable</a></li> - <li><a href="/features/experimental">Experimental</a></li> + <li><a href="/features/all">Stable</a></li> + <li><a href="/features/experimental/all">Experimental</a></li> </ul> </li> <li> @@ -78,12 +79,21 @@ <li class="dropdown"> <a class="dropdown-toggle pointer" data-toggle="dropdown">Install<span class="caret"></span></a> <ul class="dropdown-menu" aria-labelledby="themes"> - <li><a href="/install/compilers">Compilers</a></li> + <li class="header">Compilers</li> + <li class="target"><a href="/setup/javac">Javac</a></li> + <li class="target"><a href="/setup/ecj">ecj</a></li> <li class="divider"></li> - <li><a href="/install/ide">IDE</a></li> + <li class="header">IDEs</li> + <li class="target"><a href="/setup/eclipse">Eclipse</a></li> + <li class="target"><a href="/setup/intellij">IntelliJ IDEA</a></li> + <li class="target"><a href="/setup/netbeans">Netbeans</a></li> + <li class="target"><a href="/setup/eclipse">MyEclipse</a></li> + <li class="target"><a href="/setup/eclipse">Spring Tool Suite</a></li> + <li class="target"><a href="/setup/eclipse">JBoss Developer Studio</a></li> <li class="divider"></li> - <li><a href="/install/android">Android</a></li> - <li><a href="/install/others">Frameworks & build systems</a></li> + <li class="header">Platforms</li> + <li class="target"><a href="/setup/android">Android</a></li> + <li class="target"><a href="/setup/gwt">GWT</a></li> </ul> </li> <li><a href="/download">Download</a></li> 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> + <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/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> + <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>>= 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 > Settings > 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><import file="${r"${sdk.dir}"}/tools/ant/build.xml"></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><classpath></code> entry inside the <code><javac></code> task in the <code>-compile</code> target you just copied:<br /> + add <code><fileset dir="compile-libs" includes="*.jar" /></code> to it. + </li></ul> + </p> + </@s.section> +</@s.scaffold> 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> + <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/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> + <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/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> + <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/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> + <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 > Settings > 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/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> + <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/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> + <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 – Compiling</code>, check the <code>'Enable Annotation Processing in Editor'</code> checkbox. + </li></ol> + + <img src="/img/netbeans-enable-annotation-processing-in-editor.png" /> + </p> + </@s.introduction> +</@s.scaffold> |