0

I use Lombok on a maven project. The plugin is installed and seems to be working just fine. That is, until I hit the build button. Then the compiler says:

java: cannot find symbol
symbol: method getName()
location: variable resourceDAO of type mydirectory.rest.dao.ResourceDAO

referencing a class

@Getter
@Setter
public class ResourceDAO extends EntityDAO {

    private String name;
    // ...

}

the maven dependency:

<dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.24</version>
    <scope>provided</scope>
</dependency>

The IDE doesn't complain about it. Why does the compiler?

Duke
  • 386
  • 2
  • 13
  • I'm not sure tbh - In the meantime I used IntelliJ's code generation shortcut to semi-automatically get rid of Lombok. Now the code looks ugly but at least it works. – Duke Jun 22 '22 at 00:01
  • Which build button, from your IDE or a maven goal? – slindenau Jun 22 '22 at 05:23

0 Answers0