Uploaded image for project: 'Maven Shared Components'
  1. Maven Shared Components
  2. MSHARED-428

maven-dependency-analyzer does not detect method references

    Details

      Description

      maven-dependency-analyzer doesn't seem to pick up on method reference usages. When using the maven-dependency-plugin, if the only usage of a dependency is via a method reference, this causes erroneous unused dependency errors that fail our build.

      I updated the maven-dependency-analyzer tests to fail and pushed it to our fork:
      https://github.com/HubSpot/maven-shared/commit/d5ffacb808fba01837c644f2045a79eab50fecbf
      Changing from a method reference to a lambda or anonymous class makes the test pass again.

        Issue Links

          Activity

          Hide
          jhaber Jonathan Haber added a comment -

          Olivier Lamy (*$^¨%`£) Kristian Rosenvold Tibor Digana Robert Scholte let me know if you have any questions. I haven't dug too deeply yet so I'm not sure if this is a limitation of ASM or if DefaultMethodVisitor just needs an update

          Show
          jhaber Jonathan Haber added a comment - Olivier Lamy (*$^¨%`£) Kristian Rosenvold Tibor Digana Robert Scholte let me know if you have any questions. I haven't dug too deeply yet so I'm not sure if this is a limitation of ASM or if DefaultMethodVisitor just needs an update
          Hide
          krosenvold Kristian Rosenvold added a comment -

          Fixed in r1717974

          Show
          krosenvold Kristian Rosenvold added a comment - Fixed in r1717974
          Hide
          jhaber Jonathan Haber added a comment -

          Thanks! Do you know when 1.7 will be released?

          Show
          jhaber Jonathan Haber added a comment - Thanks! Do you know when 1.7 will be released?
          Hide
          afloom Anders Hammar added a comment - - edited

          Kristian Rosenvold what JDK did you verify with? Two of the new JDK 8 unit tests fail locally for me with Oracle JDK 1.8.0_45 on MacOS.
          Update: Tested with 1.8.0_65 and then the unit tests pass. Not good; need to support any patch level I think. JDK 7 support would also be good as we support that for our plugins.

          Show
          afloom Anders Hammar added a comment - - edited Kristian Rosenvold what JDK did you verify with? Two of the new JDK 8 unit tests fail locally for me with Oracle JDK 1.8.0_45 on MacOS. Update: Tested with 1.8.0_65 and then the unit tests pass. Not good; need to support any patch level I think. JDK 7 support would also be good as we support that for our plugins.
          Show
          krosenvold Kristian Rosenvold added a comment - https://bugs.openjdk.java.net/browse/JDK-7153958
          Hide
          afloom Anders Hammar added a comment -

          We should probably document this a bit better. If not to help ourselves in the future when this solution doesn't work with newer JDK's. Also, it would probably be good guidance for the end users if we explain expected differences in result depending on which JDK used (as well as update level when it comes to Oracle JDK 1.8).
          Regarding JDK-7153958 I can't figure out which update it was introduced. I can't find it being mentioned in the release notes of Oracle JDK 1.8.

          Show
          afloom Anders Hammar added a comment - We should probably document this a bit better. If not to help ourselves in the future when this solution doesn't work with newer JDK's. Also, it would probably be good guidance for the end users if we explain expected differences in result depending on which JDK used (as well as update level when it comes to Oracle JDK 1.8). Regarding JDK-7153958 I can't figure out which update it was introduced. I can't find it being mentioned in the release notes of Oracle JDK 1.8 .

            People

            • Assignee:
              krosenvold Kristian Rosenvold
              Reporter:
              jhaber Jonathan Haber
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development