Lombok not working in a Netbeans project












5















I want to use Lombok in a project to use @Getter and @Setter.



I included using Maven:



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


Import is OK for Netbeans:



import lombok.Getter;
import lombok.Setter;


But auto setters and getters don't work (no autocompletion / "cannot find symbol ...").



Strange thing is that for another project I have it's working fine! But I can't figure the differences.



I tested to:




  • change the lombok version (even the last): for any version, the import don't work anymore


  • build the project with Maven: it's OK!


  • use Eclipse: it's OK! (but I am the only one to decide unfortunately)



=> so I'm sure this is a Netbeans related problem




  • enable annotation processing, as I've seen in tutorials=> I don't have such option in my project properties


enter image description here



Any idea ?










share|improve this question



























    5















    I want to use Lombok in a project to use @Getter and @Setter.



    I included using Maven:



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


    Import is OK for Netbeans:



    import lombok.Getter;
    import lombok.Setter;


    But auto setters and getters don't work (no autocompletion / "cannot find symbol ...").



    Strange thing is that for another project I have it's working fine! But I can't figure the differences.



    I tested to:




    • change the lombok version (even the last): for any version, the import don't work anymore


    • build the project with Maven: it's OK!


    • use Eclipse: it's OK! (but I am the only one to decide unfortunately)



    => so I'm sure this is a Netbeans related problem




    • enable annotation processing, as I've seen in tutorials=> I don't have such option in my project properties


    enter image description here



    Any idea ?










    share|improve this question

























      5












      5








      5


      2






      I want to use Lombok in a project to use @Getter and @Setter.



      I included using Maven:



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


      Import is OK for Netbeans:



      import lombok.Getter;
      import lombok.Setter;


      But auto setters and getters don't work (no autocompletion / "cannot find symbol ...").



      Strange thing is that for another project I have it's working fine! But I can't figure the differences.



      I tested to:




      • change the lombok version (even the last): for any version, the import don't work anymore


      • build the project with Maven: it's OK!


      • use Eclipse: it's OK! (but I am the only one to decide unfortunately)



      => so I'm sure this is a Netbeans related problem




      • enable annotation processing, as I've seen in tutorials=> I don't have such option in my project properties


      enter image description here



      Any idea ?










      share|improve this question














      I want to use Lombok in a project to use @Getter and @Setter.



      I included using Maven:



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


      Import is OK for Netbeans:



      import lombok.Getter;
      import lombok.Setter;


      But auto setters and getters don't work (no autocompletion / "cannot find symbol ...").



      Strange thing is that for another project I have it's working fine! But I can't figure the differences.



      I tested to:




      • change the lombok version (even the last): for any version, the import don't work anymore


      • build the project with Maven: it's OK!


      • use Eclipse: it's OK! (but I am the only one to decide unfortunately)



      => so I'm sure this is a Netbeans related problem




      • enable annotation processing, as I've seen in tutorials=> I don't have such option in my project properties


      enter image description here



      Any idea ?







      netbeans lombok






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 26 '16 at 8:25









      RolintocourRolintocour

      77011229




      77011229
























          4 Answers
          4






          active

          oldest

          votes


















          5














          I found a solution on https://groups.google.com/forum/#!topic/project-lombok/xbgzA86pvJs



          => update version of maven-compiler-plugin was the only way to make it work






          share|improve this answer
























          • Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

            – Dan Smith
            Aug 3 '18 at 12:15



















          5














          In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.



          In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0



          I updated Lombok to a new version



          <dependency>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok</artifactId>
          <scope>provided</scope>
          <version>1.18.4</version> <!--1.18.4 OR 1.16.16 for Netbeans 8 with Java 8 -->
          </dependency>





          share|improve this answer


























          • Doesn't work for me (Netbeans 9.0RC1)

            – cactuschibre
            Jul 11 '18 at 8:39











          • True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

            – rjdkolb
            Jul 11 '18 at 8:44













          • Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

            – cactuschibre
            Jul 11 '18 at 9:03











          • Strange. works for me

            – rjdkolb
            Jul 11 '18 at 9:17






          • 1





            Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

            – cactuschibre
            Jul 11 '18 at 9:42



















          3














          This worked with us:




          • remove <scope>provided</scope> from the Lombok dependency

          • clean and build the project

          • change the Lombok version (we changed from 1.16.20 to 1.16.16)

          • clean and build the project

          • restore the Lombok version and put back <scope>provided</scope>

          • clean and build the project






          share|improve this answer
























          • WOW. Great Solution for me

            – Abu Bakar Siddik
            Feb 25 at 9:46



















          1














          configure the pom



          <properties>
          <src.dir>src/main/java</src.dir>
          </properties>

          <profiles>
          <profile>
          <id>lombok-build</id>
          <properties>
          <src.dir>${project.build.directory}/generated-sources/delombok</src.dir>
          </properties>
          </profile>
          </profiles>

          <dependencies>
          <dependency>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok</artifactId>
          <version>1.16.8</version>
          <scope>provided</scope>
          </dependency>
          </dependencies>
          <build>
          <sourceDirectory>${src.dir}</sourceDirectory>
          <plugins>
          <plugin>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok-maven-plugin</artifactId>
          <version>1.16.16.0</version>
          <executions>
          <execution>
          <phase>generate-sources</phase>
          <goals>
          <goal>delombok</goal>
          </goals>
          <configuration>
          <sourceDirectory>src/main/java</sourceDirectory>
          <addOutputDirectory>false</addOutputDirectory>
          </configuration>
          </execution>
          </executions>
          </plugin>
          </plugins>
          </build>


          Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.



          At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36859312%2flombok-not-working-in-a-netbeans-project%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            4 Answers
            4






            active

            oldest

            votes








            4 Answers
            4






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            5














            I found a solution on https://groups.google.com/forum/#!topic/project-lombok/xbgzA86pvJs



            => update version of maven-compiler-plugin was the only way to make it work






            share|improve this answer
























            • Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

              – Dan Smith
              Aug 3 '18 at 12:15
















            5














            I found a solution on https://groups.google.com/forum/#!topic/project-lombok/xbgzA86pvJs



            => update version of maven-compiler-plugin was the only way to make it work






            share|improve this answer
























            • Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

              – Dan Smith
              Aug 3 '18 at 12:15














            5












            5








            5







            I found a solution on https://groups.google.com/forum/#!topic/project-lombok/xbgzA86pvJs



            => update version of maven-compiler-plugin was the only way to make it work






            share|improve this answer













            I found a solution on https://groups.google.com/forum/#!topic/project-lombok/xbgzA86pvJs



            => update version of maven-compiler-plugin was the only way to make it work







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 26 '16 at 8:50









            RolintocourRolintocour

            77011229




            77011229













            • Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

              – Dan Smith
              Aug 3 '18 at 12:15



















            • Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

              – Dan Smith
              Aug 3 '18 at 12:15

















            Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

            – Dan Smith
            Aug 3 '18 at 12:15





            Updating to maven-compiler-plugin 3.8.0 fixed the issue for me.

            – Dan Smith
            Aug 3 '18 at 12:15













            5














            In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.



            In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0



            I updated Lombok to a new version



            <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
            <version>1.18.4</version> <!--1.18.4 OR 1.16.16 for Netbeans 8 with Java 8 -->
            </dependency>





            share|improve this answer


























            • Doesn't work for me (Netbeans 9.0RC1)

              – cactuschibre
              Jul 11 '18 at 8:39











            • True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

              – rjdkolb
              Jul 11 '18 at 8:44













            • Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

              – cactuschibre
              Jul 11 '18 at 9:03











            • Strange. works for me

              – rjdkolb
              Jul 11 '18 at 9:17






            • 1





              Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

              – cactuschibre
              Jul 11 '18 at 9:42
















            5














            In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.



            In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0



            I updated Lombok to a new version



            <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
            <version>1.18.4</version> <!--1.18.4 OR 1.16.16 for Netbeans 8 with Java 8 -->
            </dependency>





            share|improve this answer


























            • Doesn't work for me (Netbeans 9.0RC1)

              – cactuschibre
              Jul 11 '18 at 8:39











            • True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

              – rjdkolb
              Jul 11 '18 at 8:44













            • Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

              – cactuschibre
              Jul 11 '18 at 9:03











            • Strange. works for me

              – rjdkolb
              Jul 11 '18 at 9:17






            • 1





              Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

              – cactuschibre
              Jul 11 '18 at 9:42














            5












            5








            5







            In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.



            In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0



            I updated Lombok to a new version



            <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
            <version>1.18.4</version> <!--1.18.4 OR 1.16.16 for Netbeans 8 with Java 8 -->
            </dependency>





            share|improve this answer















            In Netbeans 8.2 using Apache Maven 3.5.4 use Lombok 1.18.4 or much older 1.16.16.



            In Netbeans 10.0/9.0 using Apache Maven 3.5.4 use Lombok 1.18.4, older versions of Lombok are really buggy when Compile On Save is used in Netbeans 10.0/9.0



            I updated Lombok to a new version



            <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
            <version>1.18.4</version> <!--1.18.4 OR 1.16.16 for Netbeans 8 with Java 8 -->
            </dependency>






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 3 at 5:47

























            answered Apr 10 '17 at 4:59









            rjdkolbrjdkolb

            4,81474864




            4,81474864













            • Doesn't work for me (Netbeans 9.0RC1)

              – cactuschibre
              Jul 11 '18 at 8:39











            • True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

              – rjdkolb
              Jul 11 '18 at 8:44













            • Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

              – cactuschibre
              Jul 11 '18 at 9:03











            • Strange. works for me

              – rjdkolb
              Jul 11 '18 at 9:17






            • 1





              Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

              – cactuschibre
              Jul 11 '18 at 9:42



















            • Doesn't work for me (Netbeans 9.0RC1)

              – cactuschibre
              Jul 11 '18 at 8:39











            • True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

              – rjdkolb
              Jul 11 '18 at 8:44













            • Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

              – cactuschibre
              Jul 11 '18 at 9:03











            • Strange. works for me

              – rjdkolb
              Jul 11 '18 at 9:17






            • 1





              Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

              – cactuschibre
              Jul 11 '18 at 9:42

















            Doesn't work for me (Netbeans 9.0RC1)

            – cactuschibre
            Jul 11 '18 at 8:39





            Doesn't work for me (Netbeans 9.0RC1)

            – cactuschibre
            Jul 11 '18 at 8:39













            True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

            – rjdkolb
            Jul 11 '18 at 8:44







            True, use 1.18.0 in Netbeans 9 RC1. I've added details. It also works in Netbeans 9 VC3 dist.apache.org/repos/dist/dev/incubator/netbeans/…

            – rjdkolb
            Jul 11 '18 at 8:44















            Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

            – cactuschibre
            Jul 11 '18 at 9:03





            Doesn't work either :( I have cleaned target, settings file, re-imported the project ...

            – cactuschibre
            Jul 11 '18 at 9:03













            Strange. works for me

            – rjdkolb
            Jul 11 '18 at 9:17





            Strange. works for me

            – rjdkolb
            Jul 11 '18 at 9:17




            1




            1





            Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

            – cactuschibre
            Jul 11 '18 at 9:42





            Thanks! It works now, I was using the bundled Maven of Netbeans 9 (3.3.9). I have switched to the latest version (3.5.4) and everything is fine now :)

            – cactuschibre
            Jul 11 '18 at 9:42











            3














            This worked with us:




            • remove <scope>provided</scope> from the Lombok dependency

            • clean and build the project

            • change the Lombok version (we changed from 1.16.20 to 1.16.16)

            • clean and build the project

            • restore the Lombok version and put back <scope>provided</scope>

            • clean and build the project






            share|improve this answer
























            • WOW. Great Solution for me

              – Abu Bakar Siddik
              Feb 25 at 9:46
















            3














            This worked with us:




            • remove <scope>provided</scope> from the Lombok dependency

            • clean and build the project

            • change the Lombok version (we changed from 1.16.20 to 1.16.16)

            • clean and build the project

            • restore the Lombok version and put back <scope>provided</scope>

            • clean and build the project






            share|improve this answer
























            • WOW. Great Solution for me

              – Abu Bakar Siddik
              Feb 25 at 9:46














            3












            3








            3







            This worked with us:




            • remove <scope>provided</scope> from the Lombok dependency

            • clean and build the project

            • change the Lombok version (we changed from 1.16.20 to 1.16.16)

            • clean and build the project

            • restore the Lombok version and put back <scope>provided</scope>

            • clean and build the project






            share|improve this answer













            This worked with us:




            • remove <scope>provided</scope> from the Lombok dependency

            • clean and build the project

            • change the Lombok version (we changed from 1.16.20 to 1.16.16)

            • clean and build the project

            • restore the Lombok version and put back <scope>provided</scope>

            • clean and build the project







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 20 '18 at 10:27









            Paul RambagsPaul Rambags

            592




            592













            • WOW. Great Solution for me

              – Abu Bakar Siddik
              Feb 25 at 9:46



















            • WOW. Great Solution for me

              – Abu Bakar Siddik
              Feb 25 at 9:46

















            WOW. Great Solution for me

            – Abu Bakar Siddik
            Feb 25 at 9:46





            WOW. Great Solution for me

            – Abu Bakar Siddik
            Feb 25 at 9:46











            1














            configure the pom



            <properties>
            <src.dir>src/main/java</src.dir>
            </properties>

            <profiles>
            <profile>
            <id>lombok-build</id>
            <properties>
            <src.dir>${project.build.directory}/generated-sources/delombok</src.dir>
            </properties>
            </profile>
            </profiles>

            <dependencies>
            <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.8</version>
            <scope>provided</scope>
            </dependency>
            </dependencies>
            <build>
            <sourceDirectory>${src.dir}</sourceDirectory>
            <plugins>
            <plugin>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok-maven-plugin</artifactId>
            <version>1.16.16.0</version>
            <executions>
            <execution>
            <phase>generate-sources</phase>
            <goals>
            <goal>delombok</goal>
            </goals>
            <configuration>
            <sourceDirectory>src/main/java</sourceDirectory>
            <addOutputDirectory>false</addOutputDirectory>
            </configuration>
            </execution>
            </executions>
            </plugin>
            </plugins>
            </build>


            Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.



            At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.






            share|improve this answer




























              1














              configure the pom



              <properties>
              <src.dir>src/main/java</src.dir>
              </properties>

              <profiles>
              <profile>
              <id>lombok-build</id>
              <properties>
              <src.dir>${project.build.directory}/generated-sources/delombok</src.dir>
              </properties>
              </profile>
              </profiles>

              <dependencies>
              <dependency>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
              <version>1.16.8</version>
              <scope>provided</scope>
              </dependency>
              </dependencies>
              <build>
              <sourceDirectory>${src.dir}</sourceDirectory>
              <plugins>
              <plugin>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok-maven-plugin</artifactId>
              <version>1.16.16.0</version>
              <executions>
              <execution>
              <phase>generate-sources</phase>
              <goals>
              <goal>delombok</goal>
              </goals>
              <configuration>
              <sourceDirectory>src/main/java</sourceDirectory>
              <addOutputDirectory>false</addOutputDirectory>
              </configuration>
              </execution>
              </executions>
              </plugin>
              </plugins>
              </build>


              Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.



              At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.






              share|improve this answer


























                1












                1








                1







                configure the pom



                <properties>
                <src.dir>src/main/java</src.dir>
                </properties>

                <profiles>
                <profile>
                <id>lombok-build</id>
                <properties>
                <src.dir>${project.build.directory}/generated-sources/delombok</src.dir>
                </properties>
                </profile>
                </profiles>

                <dependencies>
                <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.16.8</version>
                <scope>provided</scope>
                </dependency>
                </dependencies>
                <build>
                <sourceDirectory>${src.dir}</sourceDirectory>
                <plugins>
                <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.16.16.0</version>
                <executions>
                <execution>
                <phase>generate-sources</phase>
                <goals>
                <goal>delombok</goal>
                </goals>
                <configuration>
                <sourceDirectory>src/main/java</sourceDirectory>
                <addOutputDirectory>false</addOutputDirectory>
                </configuration>
                </execution>
                </executions>
                </plugin>
                </plugins>
                </build>


                Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.



                At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.






                share|improve this answer













                configure the pom



                <properties>
                <src.dir>src/main/java</src.dir>
                </properties>

                <profiles>
                <profile>
                <id>lombok-build</id>
                <properties>
                <src.dir>${project.build.directory}/generated-sources/delombok</src.dir>
                </properties>
                </profile>
                </profiles>

                <dependencies>
                <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.16.8</version>
                <scope>provided</scope>
                </dependency>
                </dependencies>
                <build>
                <sourceDirectory>${src.dir}</sourceDirectory>
                <plugins>
                <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.16.16.0</version>
                <executions>
                <execution>
                <phase>generate-sources</phase>
                <goals>
                <goal>delombok</goal>
                </goals>
                <configuration>
                <sourceDirectory>src/main/java</sourceDirectory>
                <addOutputDirectory>false</addOutputDirectory>
                </configuration>
                </execution>
                </executions>
                </plugin>
                </plugins>
                </build>


                Then, specify lombok-build as the active profile for various actions (build, debug etc) under Project Properties->Actions->Activate Profiles.



                At this blog there is a github sample project and the configuration with pictures to use lastest version of maven+netbeans+lombok, that works for me.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 22 '17 at 14:49









                Bruno MarinhoBruno Marinho

                1,064713




                1,064713






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f36859312%2flombok-not-working-in-a-netbeans-project%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Monofisismo

                    Angular Downloading a file using contenturl with Basic Authentication

                    Olmecas