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

Maven dependencies node does not show dependencies added editing POM

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 11.0, 11.1
    • 11.2

    Description

      Steps:

      1. Open or create a new maven project
      2. Expand the Dependencies node in Projects view
      3. Open pom.xml and add a dependency that has never been used before, i.e. is not in the local maven repository (.m2/repository)
      4. Save pom.xml

      Expected (works in NB 8.2): a jar entry with  the name of the dependency artifact appears under the Dependencies node of the project with a yellow triangle badge indicating new dependency detected but missing local copy.

      Actual (broken in NB11.0 and NB11.1-beta2): no jar entry appears, the log contains the following warning (here for commons-math3 dependency):

      // WARNING [org.netbeans.modules.maven.nodes.DependenciesNode]: Could not determine module name for artifact jar:file:/C:/Users/falappa/.m2/repository/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar!/
      

      In NB11.0 and NB11.1-beta2 after rebuilding the project the dependencies node gets updated and a regular jar entry appears. In NB8.2 after rebuilding the project the yellow triangle badge disappears.

      I had a look at the code and it looks like something got broken when adding modular Java support, i.e. in NB 9.0, as the code is trying to determine Java module names for each dependency.

      This is a regression, NetBeans 8.2 works, NetBeans 11.0 and NetBeans 11.1-beta2 do not, NetBeans 9.0 and 10.0 not tested.

       

      Attachments

        Issue Links

          Activity

            People

              AlexFalappa Alessandro Falappa
              AlexFalappa Alessandro Falappa
              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 - 1h 10m
                  1h 10m