Uploaded image for project: 'Maven Ant Tasks (RETIRED)'
  1. Maven Ant Tasks (RETIRED)
  2. MANTTASKS-192

NPE when using remoteRepository with refid which has not been defined

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.1.1
    • dependencies task
    • None

    Description

      <artifact:dependencies>
          <remoteRepository refid="not-defined"/>
          <dependency groupId="commons-logging" artifactId="commons-logging" version="1.1.1"/>
      </artifact:dependencies>

      causes the following NPE:

      java.lang.NullPointerException
              at org.apache.maven.artifact.ant.RemoteRepository.getUrl(RemoteRepository.java:43)
              at org.apache.maven.artifact.ant.AbstractArtifactWithRepositoryTask.addConfiguredRemoteRepository(AbstractArtifactWithRepositoryTask.java:139)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.istore(IntrospectionHelper.java:1469)
              at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.store(IntrospectionHelper.java:1463)
              at org.apache.tools.ant.IntrospectionHelper$Creator.store(IntrospectionHelper.java:1370)
              at org.apache.tools.ant.UnknownElement.handleChild(UnknownElement.java:582)
              at org.apache.tools.ant.UnknownElement.handleChildren(UnknownElement.java:349)
              at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:201)
              at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:163)
              at org.apache.tools.ant.Task.perform(Task.java:347)
              at org.apache.tools.ant.Target.execute(Target.java:390)
              at org.apache.tools.ant.Target.performTasks(Target.java:411)
              at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1397)
              at org.apache.tools.ant.Project.executeTarget(Project.java:1366)
              at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
              at org.apache.tools.ant.Project.executeTargets(Project.java:1249)
              at org.apache.tools.ant.Main.runBuild(Main.java:801)
              at org.apache.tools.ant.Main.startAnt(Main.java:218)
              at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
              at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
      

      Attachments

        Activity

          People

            hboutemy Herve Boutemy
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: