diff options
author | Mart Hagenaars <marthagenaars@gmail.com> | 2016-03-17 10:17:39 +0100 |
---|---|---|
committer | Mart Hagenaars <marthagenaars@gmail.com> | 2016-03-17 10:44:42 +0100 |
commit | 894bfe1c083fbe257eef78cbab6860032026d122 (patch) | |
tree | fb2347006736c1c56688ef778b5c6361eaf8654c /website/setup/ecj.html | |
parent | 26ad9e7f5f4de77436d3d63e4a43e8cb77621c15 (diff) | |
download | lombok-894bfe1c083fbe257eef78cbab6860032026d122.tar.gz lombok-894bfe1c083fbe257eef78cbab6860032026d122.tar.bz2 lombok-894bfe1c083fbe257eef78cbab6860032026d122.zip |
Update instructions for using lombok with ecj and Maven
Diffstat (limited to 'website/setup/ecj.html')
-rw-r--r-- | website/setup/ecj.html | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/website/setup/ecj.html b/website/setup/ecj.html index 07d2f0f6..cc70c566 100644 --- a/website/setup/ecj.html +++ b/website/setup/ecj.html @@ -42,10 +42,34 @@ <div class="downloadHelp"> ecj (the eclipse standalone compiler) is compatible with lombok. Use the following command line to enable lombok with ecj: <p> - <pre> -java <strong>-javaagent:lombok.jar=ECJ -Xbootclasspath/p:lombok.jar</strong> -jar ecj.jar -cp lombok.jar <em>(rest of arguments)</em></pre> + <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> + 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> If you're using a tool based on ecj, adding these VM arguments and adding lombok.jar to the classpath should work. </div> + <div class="separator"> + </div> + <div class="downloadHelp"> + <h3>Using ecj with Maven</h3> + <p> + It is possible to <a href="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>${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> + </div> <div class="endBar"> </div> <div class="footer"> |