Project Lombok
  • Features
    • Stable
    • Experimental
  • Community
    • Discuss / Help
    • Issues
    • Documentation for contributors
    • Contact the team behind Project Lombok
  • Order / Donate
  • How to use Install
    • Compilers
    • Javac
    • ECJ
    • Build tools
    • maven
    • gradle
    • ant
    • kobalt
    • IDEs
    • Eclipse
    • IntelliJ IDEA
    • Netbeans
    • MyEclipse
    • Spring Tool Suite
    • JBoss Developer Studio
    • Visual Studio Code
    • Platforms
    • Android
    • GWT
  • Download

Ant+ivy

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.

Just ant

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>

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="1.18.38" conf="build->master" />
</dependencies>

credits | Copyright © 2009-2025 The Project Lombok Authors, licensed under the MIT license.