Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-353

Support maven.compiler.release in pom.xml

    XMLWordPrintableJSON

Details

    Description

      I am using incubator-netbeans-release-205-on-20180202.

      Java 9 added the --release flag to javac, the maven-compiler-plugin already supports this: https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#release

      Right now, NetBeans uses maven.compiler.source (and possibly maven.compiler.target ?) to determine the source level in the Editor. It would be nice to have support for maven.compiler.release as well, since that now seems to be the preferred way to specify the source level going forward.

      I tried this new flag because I saw Robert Scholte recommending it: https://youtu.be/tHTmFlVAyAc?t=1195

      Attached is a trivial maven project that shows errors in NetBeans but compiles fine when invoking maven directly.

       

      P.S.: I also want to thank you all for your work on NetBeans, it's very stable and intuitive to get started with. I'm not a power user, but I haven't encountered any issues with the snapshot version so far.

      Attachments

        1. maven-compiler-release-flag.zip
          2 kB
          Thomas Zimmermann

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zimmi Thomas Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h