Maven Project Info Reports Plugin
  1. Maven Project Info Reports Plugin
  2. MPIR-2

Dependencies report throws NullPointerException when a transitive dependency has system scope

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta-3
    • Fix Version/s: 2.0.1
    • Component/s: None
    • Labels:
      None

      Description

      DependenciesReport.java, inside getMavenProjectFromRepository( Artifact artifact, ArtifactRepository localRepository )

      projectArtifact.file is always null, and when calling mavenProjectBuilder.buildFromRepository causes

      java.lang.NullPointerException
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:82)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:63)
      at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:377)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:343)
      at org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.getMavenProjectFromRepository(DependenciesReport.java:373)
      at org.apache.maven.report.projectinfo.DependenciesReport$DependenciesRenderer.renderBody(DependenciesReport.java:297)
      at org.apache.maven.reporting.AbstractMavenReportRenderer.render(AbstractMavenReportRenderer.java:65)

      I've made a quick fix ignoring system dependencies, not sure if we want to change it
      Inside renderBody
      if ( Artifact.SCOPE_SYSTEM.equals( artifact.getScope() ) )

      { continue; }
      1. patch.txt
        1.0 kB
        Matthew Beermann
      2. daveBodenPatch.txt
        4 kB
        David Boden

        Issue Links

          Activity

          Mark Thomas made changes -
          Workflow jira [ 12961100 ] Default workflow, editable Closed status [ 12997990 ]
          Mark Thomas made changes -
          Link This issue is duplicated by SUREFIRE-277 [ SUREFIRE-277 ]
          Mark Thomas made changes -
          Link This issue is duplicated by MSITE-125 [ MSITE-125 ]
          Mark Thomas made changes -
          Project Import Mon Apr 06 00:45:01 UTC 2015 [ 1428281101090 ]
          Mark Thomas made changes -
          Workflow jira [ 12723289 ] Default workflow, editable Closed status [ 12755845 ]
          Mark Thomas made changes -
          Link This issue is duplicated by SUREFIRE-277 [ SUREFIRE-277 ]
          Mark Thomas made changes -
          Link This issue is duplicated by MSITE-125 [ MSITE-125 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 12:10:01 UTC 2015 [ 1428235801085 ]
          Carlos Sanchez made changes -
          Link This issue is duplicated by MPIR-37 [ MPIR-37 ]
          Tuomas Kiviaho made changes -
          Link This issue is related to MNGECLIPSE-157 [ MNGECLIPSE-157 ]
          Carlos Sanchez made changes -
          Fix Version/s 2.0.1 [ 12682 ]
          Fix Version/s 2.1 [ 12621 ]
          Carlos Sanchez made changes -
          Link This issue is duplicated by MSUREFIREREP-23 [ MSUREFIREREP-23 ]
          Carlos Sanchez made changes -
          Link This issue is duplicated by MNG-2353 [ MNG-2353 ]
          Carlos Sanchez made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Assignee Carlos Sanchez [ carlos ]
          Fix Version/s 2.1 [ 12621 ]
          Resolution Fixed [ 1 ]
          David Boden made changes -
          Attachment daveBodenPatch.txt [ 20712 ]
          Brett Porter made changes -
          Fix Version/s 2.0 [ 12181 ]
          Matthew Beermann made changes -
          Attachment patch.txt [ 20610 ]
          Carlos Sanchez made changes -
          Assignee Vincent Siveton [ siveton ]
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Brett Porter made changes -
          Link This issue is duplicated by MSITE-125 [ MSITE-125 ]
          Brett Porter made changes -
          Link This issue is duplicated by MNG-2150 [ MNG-2150 ]
          Brett Porter made changes -
          Workflow Maven [ 44927 ] Maven New [ 52227 ]
          Carlos Sanchez made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Carlos Sanchez made changes -
          Affects Version/s 2.0-beta-3 [ 12180 ]
          Carlos Sanchez made changes -
          Fix Version/s 2.0 [ 12181 ]
          Carlos Sanchez made changes -
          Status Closed [ 6 ] Reopened [ 4 ]
          Resolution Fixed [ 1 ]
          Carlos Sanchez made changes -
          Link This issue is duplicated by MPIR-23 [ MPIR-23 ]
          Jason van Zyl made changes -
          Workflow jira [ 44255 ] Maven [ 44927 ]
          Allan Ramirez made changes -
          Affects Version/s 2.0 [ 11703 ]
          Fix Version/s 2.0.1 [ 12000 ]
          Component/s maven-project-info-reports-plugin [ 11810 ]
          Key MNG-1663 MPIR-2
          Workflow Maven [ 42479 ] jira [ 44255 ]
          Project Maven 2 [ 10500 ] Maven 2.x Project Info Reports Plugin [ 11142 ]
          Carlos Sanchez made changes -
          Link This issue is duplicated by MNG-1455 [ MNG-1455 ]
          Siveton Vincent made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Fixed [ 1 ]
          Siveton Vincent made changes -
          Assignee Vincent Siveton [ siveton ]
          Carlos Sanchez made changes -
          Complexity Intermediate Expert
          Carlos Sanchez made changes -
          Field Original Value New Value
          Summary Dependencies report throws NullPointerE xception when a transitive dependency has system scope Dependencies report throws NullPointerException when a transitive dependency has system scope
          Carlos Sanchez created issue -

            People

            • Assignee:
              Carlos Sanchez
              Reporter:
              Carlos Sanchez
            • Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development