Skip to content
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

Lombok Unexpected Deletion Issue in **Spring Boot Project v3.2.5** #40970

Closed
Fiigueiredo opened this issue May 31, 2024 · 2 comments
Closed

Lombok Unexpected Deletion Issue in **Spring Boot Project v3.2.5** #40970

Fiigueiredo opened this issue May 31, 2024 · 2 comments
Labels
for: external-project For an external project and not something we can fix

Comments

@Fiigueiredo
Copy link

Problem Description:

When starting a new Spring Boot application using Spring Initializr, I noticed that Lombok was included in the project dependencies. However, during the construction of the project, I noticed that Lombok was being deleted due to a specific setting in the pom.xml. This setting can cause problems as it prevents Lombok annotations from working properly during development.

Problematic Configuration Details:

In the pom.xml file, there is a section that instructs the spring-boot-maven-plugin to exclude Lombok from the build:
lombok

Proposed Solution:

To resolve this issue and ensure that Lombok works correctly in your project, you need to remove the Lombok exclusion section from the pom.xml and ensure that the Lombok dependencies are correctly configured.

Additional Steps:

Install the Lombok Plugin in your IDE: Make sure that the Lombok plugin is installed in your integrated development environment (IDE), such as IntelliJ IDEA or Eclipse, so that Lombok annotations are recognized correctly.
Rebuild the Project: After adjusting the pom.xml, run the mvn clean install command to ensure that all dependencies are resolved correctly and that the project is recompiled.

Nota:

I'd like to point out that I don't have much experience with advanced Maven and Spring Boot settings. If this issue has already been resolved or a better approach exists, please disregard this insis. Thank you

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 31, 2024
@philwebb
Copy link
Member

philwebb commented Jun 1, 2024

The Lombok exclusion should only apply to the spring-boot-maven-plugin and it shouldn't stop Lombok from working. You should see that in the generated project there is also the following depenency:

<dependency>
  <groupId>org.projectlombok</groupId>
  <artifactId>lombok</artifactId>
  <optional>true</optional>
</dependency>

I'm not sure what's causing Lombok to fail for you, I think we're going to need a sample project and detailed instructions on how to reproduce the issue.

If you want to provide those, please open a new issue at https://github.com/spring-io/start.spring.io since that's the project responsible for generating the POM xml file.

@philwebb philwebb closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
@philwebb philwebb added for: external-project For an external project and not something we can fix and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 1, 2024
@quangthangit
Copy link

lombok is installed but not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: external-project For an external project and not something we can fix
Projects
None yet
Development

No branches or pull requests

4 participants