Install Lombok In Apache Netbeans

How To Install Project Lombok In Apache Netbeans


# Dev Environment:

  • Apache maven (v3.6.1)
  • maven-compiler-plugin (v3.8.1)
  • lombok (v1.18.8)
  • Apache Netbeans (v10.0)

# Installation Steps:

  1. Go to project lombok's download page and download the latest stable jar file. Add it to your project libraries.
    • NOTE: Incase you're working on a Maven Project, this step isn't neccessary. All you need is to add lombok as a project dependency in your pom.xml file. i.e
    
     <dependencies>
     <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
     	<dependency>
     		<groupId>org.projectlombok</groupId>
     		<artifactId>lombok</artifactId>
     		<version>1.18.8</version>
     		<scope>provided</scope>
     	</dependency>
     </dependencies>
     
    • Once the dependency is added, Right-click your project >> Select "Build with Dependencies". Maven will download the dependencies listed in your pom.xml file.

  2. Now when you use lombok specific annotations, Clicking the red danger icon in the gutter should pop up a context menu. In the menu you should be able to easily import the relevant annotation. i.e Add import for lombok.Getter
  3. How To Install Project Lombok In Apache Netbeans
  4. That's it for today. Don't hesitate to leave a comment. Your feedback is greatly appreciated.
About The Author   

Steven Mwesigwa

Software Engineer at Vogue Book Consultancy Services Ltd


Picture Of Steven Mwesigwa

Steve is currently a software developer at Vogue Book Consultancy Services Ltd and a technology author. He holds a Dip. in civil engineering from Kyambogo University. He founded and maintains stevenmwesigwa.com a website that receives more than 1.5 thousand visits per month. Steve can be reached on Twitter at @steven7mwwesigwa