In your Maven based application, you can follow the below Maven Lombok Configuration by adding the following maven dependencies in your pom.xml.
Prerequisites
These are the pre-requisite of Project Lombok to configure in any applications and IDE.
Java >= 1.8
Gradle >= 4.x or Maven 3.6.x
Project Lombok >= 1.18.20
See Also:
Lombok Maven Dependency
You can add below Lombok dependency in you pom.xml
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
<scope>provided</scope>
</dependency>
Lombok Maven Compiler Plugin
You can add below dependency in maven-compiler-plugin of your pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>11</source> <!-- depending on your project -->
<target>11</target> <!-- depending on your project -->
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.20</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Now your application is all set for using the Lombok Annotations by adding above Maven Lombok Configuration.
Note :
you still have to download lombok.jar
(or find it in Maven’s caches) and run it as a jar file, if you wish to program in eclipse. The plugin makes that part easier. Follow this link : Eclipse Lombok Configuration
References
Related Posts
Your Feedback Motivate Us
If our FacingIssuesOnIT Experts solutions guide you to resolve your issues and improve your knowledge. Please share your comments, like and subscribe to get notifications for our posts.
Happy Learning !!!
You must log in to post a comment.