Skip to content

Set Lombok to provided scope #658

@yeikel

Description

@yeikel

Description

Lombok should not be present in the classpath because it is only used at compile time. As per the docs, the dependency should set to the provided scope.

Describe the situation before applying the recipe

            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>

Describe the situation after applying the recipe

diff --git a/pom.xml b/pom.xml
index 9d43d17f8..795236488 100644
--- a/pom.xml
+++ b/pom.xml
@@ -245,6 +245,7 @@
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>
             <version>${lombok.version}</version>
+            <scope>provided</scope>
         </dependency>

Any additional context

This can be implemented as a YAML recipe using the change scope recipe

Official docs: https://projectlombok.org/setup/maven

Metadata

Metadata

Assignees

Labels

recipeRecipe requested

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions