Describe the bug
Lombok won麓t produce the builder class with the @Builder annotation in the library module, but it works as expected in the application module
Caused by: java.lang.ClassNotFoundException: com.demo.common.model.SharedModel$SharedModelBuilder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 22 more
To Reproduce
I麓ve made a demo project to reproduce this issue
https://github.com/mklueh/quarkus-multi-module-lombok-builder-issue
/cc @geoand
/cc @patriot1burke
/cc @gsmet @yrodiere
/cc @gsmet
/cc @EricWittmann
/cc @mkouba
/cc @FroMage @loicmathieu
/cc @quarkusio/devtools
/cc @gsmet @Sanne
/cc @loicmathieu
I can reproduce this, or at least the root cause, without much trouble in a maven multi module project.
The problem is, I think at least, that the maven-compiler-plugin is only triggered for the module, where the quarkus-maven-plugin is included.
No compilation is done for librarys. The compiler-plugin is not triggered for them.
@Postremus This sounds like another issue I麓ve posted, where the library module is not compiled into the classpath at all https://github.com/quarkusio/quarkus/issues/7365 . In case of the @Builder issue the class with the annotation is compiled, but not Builder class is generated
Appears to be fixed in 1.3.0.Final. Thanks for the report!