aboutsummaryrefslogtreecommitdiff
path: root/website-old/setup/ecj.html
blob: cc70c566648ff3540106831cad62c675941371ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE html>
<html><head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<script src="../logi/jQuery-all.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="../logi/reset.css" />
	<link rel="stylesheet" type="text/css" href="../index.css" />
	<link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" />
	<meta name="description" content="Spice up your java" />
	<title>Project Lombok</title>
	<!--[if lt IE 7]><script type="text/javascript" src="../logi/iepngfix_tilebg.js"></script><![endif]--> 
</head><body>
	<a id="forkMe" href="https://github.com/rzwitserloot/lombok"><img style="position: absolute; top: 0; right: 0; border: 0;" src="//s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
	<div class="meat">
		<h1><a href="/">Project Lombok</a> - ecj instructions</h1>
		<div id="buttonBar" class="buttonBar">
			<a class="button" href="../features/index.html">
				<img src="../icon_overview.png" />
				<span>Feature Overview</span>
			</a>
			<a class="button" href="https://groups.google.com/group/project-lombok">
				<img src="../icon_discussion.png" />
				<span>Discuss / Help</span>
			</a>
			<a class="button" href="https://wiki.github.com/rzwitserloot/lombok/contributing">
				<img src="../icon_contribute.png" />
				<span>Contribute</span>
			</a>
			<a class="button" href="https://github.com/rzwitserloot/lombok/issues">
				<img src="../icon_bugs.png" />
				<span>Report an issue</span>
			</a>
			<div class="downloadContainer">
				<a class="downloadLink" id="downloadLink" href="../download.html">
					<img src="../icon_download.png" />
					<span>Download!</span>
				</a>
				<div class="versionInfo">
					Version: @VERSION@ | <a href="../changelog.html">changelog</a>
				</div>
			</div>
		</div>
		<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</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">
			<a href="../credits.html" class="creditsLink">credits</a> | Copyright &copy; 2009-2016 The Project Lombok Authors, licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT license</a>.
		</div>
	</div>
	<script type="text/javascript">
		var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
		document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">
		try {
			var pageTracker = _gat._getTracker("UA-9884254-1");
			pageTracker._trackPageview();
		} catch(err) {}
	</script>
</body></html>