I used spring initializer to create the project and I added the lombok dependency using it However adding provided to my pom.xml fixed the problem
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
<scope>provided</scope>
</dependency>