aboutsummaryrefslogtreecommitdiff
path: root/website/templates/setup/ant.html
blob: 3781e01d0bcf6f9c81e12420a13252ffe14e6dd5 (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
<#import "_setup.html" as s>

<@s.scaffold title="Ant+ivy">
	<@s.introduction>
		<p>
			This page explains how to compile your code when you use the <a href="https://ant.apache.org/">Apache Ant</a> build tool. We suggest you use <a href="http://ant.apache.org/ivy/">ivy</a>, the ant add-on that lets you fetch dependencies from the internet automatically.
		</p><p>
			Lombok just needs to be on the classpath when you compile your code to do its work, so all you have to ensure, is that lombok is on the classpath in your <code>&lt;javac&gt;</code> task.
		</p>
	</@s.introduction>

	<@s.section title="Just ant">
		<p>
			Assuming that you've put <code>lombok.jar</code> in a <code>lib</code> dir, your javac task would have to look like:<pre>
&lt;javac srcdir="src" destdir="build" source="1.8"&gt;
	&lt;classpath location="lib/lombok.jar" /&gt;
&lt;/javac&gt;</pre>
		</p>
	</@s.section>
	
	<@s.section title="Ant with Ivy">
		<p>
			Lombok is available in Maven Central, so you can tell ivy to fetch lombok like so (assuming you have a configuration named <code>build</code>:<pre>
&lt;dependencies&gt;
	&lt;dependency org="org.projectlombok" name="lombok" rev="${version}" conf="build->master" /&gt;
&lt;/dependencies&gt;</pre>
		</p>
	</@s.section>
</@s.scaffold>