Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5823

Ivy plugin throws a NullPointerException if you leave the targets field blank

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ivy-plugin
    • None

      Ivy plugin throws a NullPointerException if you leave the targets field blank. It should just default to using whatever the default target is in the build.xml file.

      Reported by Cristian Vulpe on the users list.

      Hello..

      I am beginning to set up Hudson with Ivy for our build structure.
      I am using a placeholder build.xml and ivy.xml. When I do a build,
      I get the exception below.
      Could you please take a look and let me know what's up?

      Thank you..
      Cris Vulpe
      Narus, Inc.

      Started by user anonymous
      ...
      Sync complete, took 1470 ms
      Parsing Ivy Descriptor Files
      Discovered a new module apache:hello-ivy hello-ivy
      ERROR: Processing failed due to a bug in the code. Please report this to users@hudson.dev.java.net
      java.lang.NullPointerException
                      at hudson.tasks.Ant.perform(Ant.java:181)
                      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:478)
                      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
                      at hudson.model.Run.run(Run.java:1210)
                      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:283)
                      at hudson.model.ResourceController.execute(ResourceController.java:88)
                      at hudson.model.Executor.run(Executor.java:122)
      project=hudson.ivy.IvyModuleSet@78d4ccbb[test_build_2]
      project.getModules()=[hudson.ivy.IvyModule@4191e97d[test_build_2/apache:hello-ivy]]
      FATAL: null
      java.lang.NullPointerException
                      at hudson.tasks.Ant.perform(Ant.java:181)
                      at hudson.ivy.IvyModuleSetBuild$RunnerImpl.doRun(IvyModuleSetBuild.java:478)
                      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416)
                      at hudson.model.Run.run(Run.java:1210)
                      at hudson.ivy.IvyModuleSetBuild.run(IvyModuleSetBuild.java:283)
                      at hudson.model.ResourceController.execute(ResourceController.java:88)
                      at hudson.model.Executor.run(Executor.java:122)

          [JENKINS-5823] Ivy plugin throws a NullPointerException if you leave the targets field blank

          Code changed in hudson
          User: : tbingaman
          Path:
          trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSet.java
          http://jenkins-ci.org/commit/28239
          Log:
          [FIXED JENKINS-5823] Fixed issue where if the targets field was left blank it was nullified, causing an NPE in the Ant build. Now the targets field is only trimmed and will use the default target in the Ant build file when left blank.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : tbingaman Path: trunk/hudson/plugins/ivy/src/main/java/hudson/ivy/IvyModuleSet.java http://jenkins-ci.org/commit/28239 Log: [FIXED JENKINS-5823] Fixed issue where if the targets field was left blank it was nullified, causing an NPE in the Ant build. Now the targets field is only trimmed and will use the default target in the Ant build file when left blank.

            tbingaman Timothy Bingaman
            tbingaman Timothy Bingaman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: