Has anyone used Ant4Eclipse with Project Lombok?
- by gmcnaughton
Has anyone successfully used Ant4Eclipse (http://www.ant4eclipse.org/) in combination with Project Lombok (http://projectlombok.org/)?
Lombok provides annotations for removing boilerplate code; however, it doesn't appear to play nicely with Ant4Eclipse (headless compilation of Eclipse projects). For instance, the following Lombok sample compiles fine in Eclipse and javac:
import lombok.Getter;
public class LombokTest {
private @Getter String foo;
public LombokTest() {
String s = this.getFoo();
}
}
But compiling with Ant4Eclipse's <buildJdtProject> yields the following:
[javac] Compiling 1 source file
[javac] ----------
[javac] 1. WARNING in C:\dev\Java\workspace\LombokTest\src\LombokTest.java (at line 4)
[javac] private @Getter String foo;
[javac] ^^^
[javac] The field LombokTest.foo is never read locally
[javac] ----------
[javac] 2. ERROR in C:\dev\Java\workspace\LombokTest\src\LombokTest.java (at line 8)
[javac] String s = this.getFoo();
[javac] ^^^^^^
[javac] The method getFoo() is undefined for the type LombokTest
[javac] ----------
Has anyone successfully used these libraries together?
Thanks!
Edit: sample project demonstrating the issue