Lombok annotations not processed when using Gateway over SSH


Trying to get my remote development environment set up. 

Using the Gateway Client to access IntelliJ over SSH, I'm able to load, index and parse my project, with the exception that when I attempt to build, I'm inundated with errors pertaining to not being able to find Lombok-generated classes and methods.

Under "Plugins (on host)", the Lombok plugin is listed as Installed & Enabled, and pressing Ctrl+B on a Lombok annotation takes me to the appropriate class file. So where are my getFoo() methods and so forth? 

What might I be missing here? Thank you for any help.


Hi, did you enable the setting of Annotation Processors in IDEA? Also you may provide me a sample project and let me to check if I can reproduce it, you can upload one at https://uploads.jetbrains.com/ and share the public link here.

If not, please follow the guide in https://www.baeldung.com/lombok-ide#intellij-apt 

2.1. Enabling Annotation Processing

Lombok uses annotation processing through APT. So, when the compiler calls it, the library generates new source files based on annotations in the originals.

Annotation processing isn't enabled by default, though.

Therefore, the first thing to do is to enable annotation processing in our project.

We need to go to the Preferences | Build, Execution, Deployment | Compiler | Annotation Processors and make sure of the following:

  • Enable annotation processing box is checked
  • Obtain processors from project classpath option is selected



And shall you provide a screenshot of what the error is?


I did enable Annotation processing as described above. Here is a link to the gradle build report, and here is a screenshot of some of the errors I'm getting:

Essentially, any and all Lombok-generated classes (e.g., builders) and methods (getFoo()) are not found.

Here is the project configuration:

Thank you for your help.



In this case, your build is controlled by the Gradle system, and IDEA will not touch your source files or generate classes at all, and it will not be caused by the Gateway service in theory. Although you can see all the setters or getters in IDEA, under the hood is that the Lombok plugin in IDEA ignores these errors and provide a jump to definition features there.

I have uploaded a sample project for you to take a test: https://github.com/beansoft/lombok_gradle_hello

In the file build.gradle, if you disable the line annotationProcessor 'org.projectlombok:lombok:1.18.24', your project will not be compiled successfully by Gradle.

Hope this could help your project, or you can only share your build.gradle file contents here.

plugins {
id 'java'

group 'org.example'
version '1.0-SNAPSHOT'

repositories {

dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
// If you comment out this line, the build of Gradle will fail!
annotationProcessor 'org.projectlombok:lombok:1.18.24'


If I understand you correctly, Gradle is responsible for creating the intermittent classes from the Lombok annotations? Therefore, the problem would be in my Gradle configuration? Here is my build.gradle:

buildscript {
dependencies {
classpath "net.uberfoo.gradle:gradle-aspectj:2.2"

plugins {
id 'org.springframework.boot' version '2.7.6'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id "io.freefair.aspectj.post-compile-weaving" version "6.6-rc1"

group = 'self.me'
version = '0.0.1-SNAPSHOT'

configurations {
runtimeClasspath {
extendsFrom developmentOnly

dependencies {

// Spring Boot
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-json'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-websocket'
implementation 'org.springframework.boot:spring-boot-starter-hateoas'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
// AOP
implementation 'org.springframework.boot:spring-boot-starter-aop'
implementation 'org.springframework:spring-instrument'
implementation 'org.springframework:spring-aspects'
implementation 'org.aspectj:aspectjrt:'
implementation 'org.aspectj:aspectjweaver:'

// Database
implementation 'mysql:mysql-connector-java'
implementation 'org.flywaydb:flyway-mysql:9.8.2'
implementation 'org.flywaydb:flyway-core:9.8.2'
implementation 'com.h2database:h2'

// Annotations
implementation 'org.jetbrains:annotations:23.0.0'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
// Lombok
implementation 'org.projectlombok:lombok'
testImplementation 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

// Parsing
implementation 'com.google.code.gson:gson'
implementation 'org.jsoup:jsoup:1.15.3'
implementation 'org.brotli:dec:0.1.2'
implementation 'javax.activation:activation:1.1.1'

// Development
implementation 'com.google.code.findbugs:jsr305:3.0.2'
// Remove to eliminate reflective access warning, per: https://stackoverflow.com/a/61007739/4871490
developmentOnly 'org.springframework.boot:spring-boot-devtools'

// Testing
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'unit-vintage-engine'
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.junit.jupiter:junit-jupiter'
testImplementation 'org.junit.jupiter:junit-jupiter-params'
testImplementation 'org.junit.jupiter:junit-jupiter-api'

bootRun {
if (project.hasProperty('args')) {
args = project.args.split(',' as Closure)

test {

repositories {

I resolved this issue by completely deleting the project directory, and then re-cloning from GitHub. Suddenly Lombok is happy, and all is right with the world.


I'm glad to hear that. Maybe Gradle clean does the same thing.


I spoke too soon. The project compiles and runs via the IDE, but running Gradle manually (e.g., ./gradlew build) fails. I guess I am unclear as to how the IDE interacts with Gradle. Looking at the command line, it would appear that the IDE does not use Gradle at all when running the app. Is this correct?

When I try to build or run via Gradle on my local machine (Windows) it works fine. It only fails when trying on the remote machine (Ubuntu in a docker container on an Ubuntu machine). Very weird.


When I try to build or run via Gradle on my local machine (Windows) it works fine.

You can try this command instead: gradlew  clean build  to see if still works.

The Gradle project compiles and runs via the IDEA is also using Gradle commands underhood, you can check which JDK it used in:

File | Settings | Build, Execution, Deployment | Build Tools | Gradle

I'm also using an Ubuntu virtual machine, with the project https://github.com/beansoft/lombok_gradle_hello , I can build it this way(using the Terminal in IDEA):

export JAVA_HOME=~/.jdks/corretto-11.0.17
./gradlew clean build

Please sign in to leave a comment.