Lombok dependency works at runtime, but is somehow is not resolved at production build time.
Relevant pom snippets:
<properties>
<java.version>25</java.version>
<vaadin.version>25.2.1</vaadin.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>4.1.0</version>
</parent>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
Annotated GreetService with @Log and added log.info(...)
Run: Successful. I see the log.info output on the console
Trigger production build with mvn clean package as mentioned here
Got this
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.136 s
[INFO] Finished at: 2026-07-08T19:14:52+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.15.0:compile (default-compile) on project lombok-test: Compilation failure: Compilation failure:
[ERROR] /Users/maneesh/VaadinProjects/LombokTest/src/main/java/com/example/application/GreetService.java:[14,13] cannot find symbol
[ERROR] symbol: variable log
[ERROR] location: class com.example.application.GreetService
[ERROR] /Users/maneesh/VaadinProjects/LombokTest/src/main/java/com/example/application/GreetService.java:[17,13] cannot find symbol
[ERROR] symbol: variable log
[ERROR] location: class com.example.application.GreetService
I just can’t figure out why.