#import "_setup.html" as s> <@s.scaffold title="Ant+ivy"> <@s.introduction>
This page explains how to compile your code when you use the Apache Ant build tool. We suggest you use ivy, the ant add-on that lets you fetch dependencies from the internet automatically.
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 <javac>
task.
Assuming that you've put lombok.jar
in a lib
dir, your javac task would have to look like:
<javac srcdir="src" destdir="build" source="1.8"> <classpath location="lib/lombok.jar" /> </javac>@s.section> <@s.section title="Ant with Ivy">
Lombok is available in Maven Central, so you can tell ivy to fetch lombok like so (assuming you have a configuration named build
:
<dependencies> <dependency org="org.projectlombok" name="lombok" rev="${version}" conf="build->master" /> </dependencies>@s.section> @s.scaffold>