netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Enable annotation processing

Open javatlacati opened this issue 2 years ago • 4 comments

Apache NetBeans version

Apache NetBeans 14

What happened

In Oracle netbeans there was an option for enabling annotation processing which is missing in apache netbeans.

How to reproduce

on Projects tab select the root of your java project > Properties > Build > Compile

The checkbox "enable annotation processing" is missing.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows 10

JDK

Java: 17.0.2; Eclipse OpenJ9 VM openj9-0.30.0 Runtime: IBM Semeru Runtime Open Edition 17.0.2+8

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

A common use case is loading a project with lombok.

Are you willing to submit a pull request?

No

Code of Conduct

Yes

javatlacati avatar Aug 11 '22 01:08 javatlacati

That option is still there in the Ant project UI. Which build system are you using? Are you trying to enable to disable? What is actually not working?

neilcsmith-net avatar Aug 12 '22 08:08 neilcsmith-net

I'm using maven as build system. It seems that it is enabled by default on Oracle JDK, but when using other one like Semeru it's not.

javatlacati avatar Aug 12 '22 13:08 javatlacati

with maven you should edit your pom.xml to have lombok configured <artifactId>maven-compiler-plugin</artifactId> <annotationProcessorPaths> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> 1.18.24 </annotationProcessorPaths>

and also append dependencies <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> 1.18.24

get/set are available in navigator and in code completion. Tutorial is for ant.

ebarboni avatar Aug 12 '22 14:08 ebarboni

yes, lombok is configured properly in the pom.xml

javatlacati avatar Aug 13 '22 22:08 javatlacati