如何使用JDT API编译带有Lombok批注的代码

时间:2019-01-04 05:33:34

标签: lombok eclipse-jdt

我正在使用jdt api动态编译Java,该api是 BatchCompiler

现在,我的问题是使用l​​ombok批注的项目无法成功编译。这意味着缺少getter和setter方法!

String strComd = "/project/src/main/java -log /project/work/logs/1.log -verbose  -progress  -XprintRounds -8  -d /project/work/output";

BatchCompiler.compile(strCmd, new PrintWriter(System.out), new PrintWriter(System.err), null);

145. ERROR in /xxx/halo/controller/JarReleaseController.java (at line 96)
for (AppVO appVO : releaseVO.getApps()) {
                             ^^^^^^^
The method getApps() is undefined for the type ReleaseVO 

0 个答案:

没有答案