'Lombok doest not work in quarkus extension
It's the first time that I have to write a Quarkus extension and I'm having problems with Lombok, after that, i have added the dependency to the pom's dependencies list and installed Lombok in eclipse the IDE works well during the writing of the code, but when i want to test it after compiling it the application broke because it's not able to find the code the code that Lombok should have generated.
that's how we imported it in pom:
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
an this is the error
[ERROR]/C:/Users/daniele/Documents/GitHub/jrv_library_bean_monitoring_quarkus/sources/JarvisBeanMonitoringQuarkusLib/deployment/src/test/java/com/jarvis/quarkus/monitoring/lib/test/QuarkusMonitoringLibTest.java:[25,10] cannot find symbol
[ERROR] symbol: method setMessage(java.lang.String)
[ERROR] location: variable x of type com.jarvis.monitoring.bean.OutputBean
Solution 1:[1]
Adjust compiler plugin config for your extension. Should be something like that:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
</path>
<path>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-processor</artifactId>
<version>${quarkus.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | NullPointer |