-
Notifications
You must be signed in to change notification settings - Fork 666
fix: build failure for lombok in JDK23 #767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fix build failure: ``` [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project apm-agent-core: Compilation failure: Compilation failure: [ERROR] /opt/code/git/skywalking-java/apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/trace/TraceSegmentRef.java:[51,31] cannot find symbol [ERROR] symbol: method getTraceId() ```
|
Which env does you face this? The project is built successfully in local and CI env(s). |
It happens in two situations:
JDK versionMaven version |
|
We only support Java 11/17/21, and consider that you just bumped up lombok, could you recheck whether this is a JDK23-specific issue? And notice, JDK23 is not a TLS version. Do you have some specific reasons to use that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a build failure caused by missing getter methods in Lombok-annotated classes by configuring the Maven compiler plugin to properly process Lombok annotations during compilation.
- Adds Lombok annotation processor configuration to the Maven compiler plugin
- Ensures getter methods are generated during compilation for classes using Lombok annotations
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| <path> | ||
| <groupId>org.projectlombok</groupId> | ||
| <artifactId>lombok</artifactId> | ||
| <version>${lombok.version}</version> |
Copilot
AI
Aug 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Lombok version is referenced using a property ${lombok.version} but this property may not be defined in the POM. Consider verifying that this property is declared in the properties section or use an explicit version number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leeyazhou I think this is a false alarm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The property ${lombok.version} is defined in line 86 in the ROOT pom.xml
<lombok.version>1.18.30</lombok.version>
kezhenxu94
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be good regardless which JDK version
fix build failure: